Hi --

On Sat, 24 Oct 2009, nin_d wrote:

>
> Fred, owner do exist.
>
> class Feature < ActiveRecord::Base
>  belongs_to :project
>  belongs_to :owner, :class_name => "User", :foreign_key => "owner_id"
> end
>
> Now in features controller, I have
>
> @features = @project.features.find(:all, :include => :owner)
>
> and dump for @features in view is where i see only two features being
> loaded and not the corresponding owner (only 1 in this case, with id
> 1) -

Look again in your original post. There's a debug dump of a Feature
that has no owner_id.


David

-- 
The          Ruby training with D. Black, G. Brown, J.McAnally
Compleat     Jan 22-23, 2010, Tampa, FL
Rubyist      http://www.thecompleatrubyist.com

David A. Black/Ruby Power and Light, LLC (http://www.rubypal.com)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to