I've an almost-empty project. One trivial page, Rails 2.3. Start the project, 
load the page, all good. Reload the page and get the below. Basically, the 
class_inheritable_accessor skip_time_zone_conversion_for_attributes  is 
disappearing from the class. This appears to be because when the class is 
reloaded in development mode, the monkeypatched include is not getting called 
on Class.

Clearly there must be more to it, or this would just break for everyone. But 
debugging this looks like it will be a right pita, so I thought I'd see if 
anyone had any thoughts why this is happening.

NoMethodError in Rma#new

Showing app/views/rma/_detail.html.erb where line #3 raised:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?

Extracted source (around line #3):

1: <%= image_tag 'iparq.jpg' -%>
2: <h1>Request an RMA</h1>
3: <%- form_for @thing do |f| -%>
4:     <%= f.label 'identifier' %><%= f.text_field :identifier -%><br />
5:     <%= f.label 'organization', 'Name of organization' -%><%= f.text_field 
:submitter -%><br />
6:     <%= f.label 'submitter', 'Person submitting request' -%><%= f.text_field 
:submitter -%><br />

Trace of template inclusion: app/views/rma/new.html.erb

RAILS_ROOT: /Users/gisborne/Documents/iparq/assets

Application Trace | Framework Trace | Full Trace
/Users/gisborne/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:142:in
 `create_time_zone_conversion_attribute?'
/Users/gisborne/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:75:in
 `define_attribute_methods'
/Users/gisborne/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:71:in
 `each'
/Users/gisborne/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:71:in
 `define_attribute_methods'
/Users/gisborne/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:242:in
 `method_missing'
/Users/gisborne/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/record_identifier.rb:76:in
 `dom_id'
/Users/gisborne/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/record_identification_helper.rb:16:in
 `dom_id'
/Users/gisborne/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/form_helper.rb:291:in
 `apply_form_for_options!'
/Users/gisborne/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/form_helper.rb:277:in
 `form_for'
/Users/gisborne/Documents/iparq/assets/app/views/rma/_detail.html.erb:3:in 
`_run_erb_app47views47rma47_detail46html46erb_locals_detail_object'
/Users/gisborne/Documents/iparq/assets/app/views/rma/new.html.erb:1:in 
`_run_erb_app47views47rma47new46html46erb'



Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178

Ruby/Rails,  REALbasic, PHP programming
PostgreSQL, MySQL database design and consulting
Technical writing and training

Read my book, Real OOP with REALbasic: 
<http://relevantlogic.com/oop-book/about-the-oop-book.php>

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to