Sorry, the previous code was wrong, anyway the problem is the same:
def edit
@post = Post.find(params[:id],:include => [:ingredients,
{:ingredients => :eng_ingredient}])
ingredients = @post.ingredients
ing = ingredients[0] # <-- ing is not nil
ei = ing.eng_ingredient # <-- ei is not nil but it's
attrs are nil
..
end
--
Posted via http://www.ruby-forum.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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---