<h1><font size="2">following is model code in file <span style="text-decoration: underline;">order_payment.rb</span></font><br></h1><h1><font style="font-weight: normal;" size="2">class OrderPayment < ActiveRecord::Base
<br> belongs_to :order<br> validates_presence_of :amount, :no<br>end<br><br>class LC < OrderPayment <br>end<br><br>class LC30 < LC<br>end<br><br>class LC60 < LC<br>end<br><br>class LC90 < LC<br>end<br><br>class LC120 < LC
<br>end<br><br>class TT < OrderPayment<br> <br>end<br><br>class CAD < OrderPayment<br> <br>end</font><br></h1><h1><font style="font-weight: bold; font-style: italic;" size="2">and following is error i'm getting with
rails1.1.0 above code is working fine with rails1.0.0</font><br></h1><h1>
NameError in
Order#add_payment
</h1>
<pre>uninitialized constant LC</pre>
<p><code>RAILS_ROOT: script/../config/..</code></p>
<div>
<a href="http://0.0.0.0:3000/order/add_payment?order_id=44#" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Application Trace</a> |
<a href="http://0.0.0.0:3000/order/add_payment?order_id=44#" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Framework Trace</a> |
<a href="http://0.0.0.0:3000/order/add_payment?order_id=44#" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Full Trace</a>
<div style="display: block;">
<pre><code>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:112:in `const_missing'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:120:in `const_missing'
<br><br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:122:in `const_missing'<br>#{RAILS_ROOT}/app/controllers/order_controller.rb:61:in `add_payment'</code></pre>
</div>
<div>
<pre><code>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:112:in `const_missing'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:120:in `const_missing'
<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:122:in `const_missing'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:908:in `perform_action_without_filters'
<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:355:in `perform_action_without_benchmark'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
<br>/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0
/lib/action_controller/rescue.rb:82:in `perform_action'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:379:in `process_without_filters'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:364:in `process_without_session_management_support'
<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:117:in `process'<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/dispatcher.rb:38:in `dispatch'<br>/usr/lib/ruby/gems/1.8/gems/rails-
1.1.0/lib/webrick_server.rb:115:in `handle_dispatch'<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:81:in `service'<br>/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'<br>/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
<br>/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'<br>/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'<br>/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'<br>/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
<br>/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'<br>/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:67:in `dispatch'<br>/usr/lib/ruby/gems/1.8/gems/rails-
1.1.0/lib/commands/servers/webrick.rb:59<br>/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:136:in `require'<br>
/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/server.rb:30<br>/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:136:in `require'
<br>./script/server:3</code></pre>
</div>
<div>
<pre><code>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:112:in `const_missing'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:120:in `const_missing'
<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:122:in `const_missing'<br>#{RAILS_ROOT}/app/controllers/order_controller.rb:61:in `add_payment'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-
1.12.0/lib/action_controller/base.rb:908:in `perform_action_without_filters'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:355:in `perform_action_without_benchmark'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-
1.12.0/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'<br>/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/rescue.rb:82:in `perform_action'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:379:in `process_without_filters'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-
1.12.0/lib/action_controller/filters.rb:364:in `process_without_session_management_support'<br>/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:117:in `process'<br>/usr/lib/ruby/gems/1.8/gems/rails-
1.1.0/lib/dispatcher.rb:38:in `dispatch'<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:115:in `handle_dispatch'<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:81:in `service'<br>/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
<br>/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'<br>/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'<br>/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'<br>/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
<br>/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'<br>/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'<br>/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:67:in `dispatch'
<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/servers/webrick.rb:59<br>/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:136:in `require'
<br>/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/server.rb:30<br>/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'<br>/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:136:in `require'
<br>./script/server:3</code></pre>
</div>
</div>
<pre><code>This error occured while loading the following files:<br> lc.rb</code></pre>
<h2 style="margin-top: 30px;">Request</h2>
<p><b>Parameters</b>: {"order_id"=>"44",
"commit"=>"add",
"payment"=>{"no"=>"NON",
"date"=>"",
"expiry_date"=>"",
"type"=>"LC",
"paid"=>"0",
"ship_date"=>"",
"amount"=>"23"}}</p>
<p><a href="http://0.0.0.0:3000/order/add_payment?order_id=44#" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Show session dump</a><br></p>
<h2 style="margin-top: 30px;">Response</h2>
<b>Headers</b>: {"cookie"=>[],
"Cache-Control"=>"no-cache"}<br clear="all"><br>