i came across this post by s.ross and i am having a similar problem.
but mine is related to output.
<http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/
3f3a0f4b1e8ab157/e5d055c888a155da?lnk=gst&q=multiple
+belongs_to#e5d055c888a155da>
in his example his he has multiple associations
class Bug < ActiveRecord::Base
belongs_to :reporter, :class_name=>'User', :foreign_key =>
‘reporter_id’
belongs_to :assignee, :class_name=>‘User’, :foreign_key =>
‘assigned_to_id’
everything works great, in console but in the app.
@bugs = Bug.find :all
for errors in @bugs
errors.date - no problem works fine
errors.reporter.name - gets an error
errors[45].reporter.name - works fine
what am i doing wrong
this works in console
ie:
@bugs = Bug.find :all
one_error = @bugs[45]
one_error.date (good)
one_error.reporter.name (good)
one_error.assignee.name (good)
it has to be something simple. tia