Hi all,
Sorry if this question looks stupid..
In my post on edit action I have:
def edit
@post = Post.find(params[:id],:include => [:ingredients,
{:ingredients => :heb_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
This doesn''t work only when I execute on browser. However if I run all
the commands thru script/console, then all the data is correct and
present.
What can be the problem? All the models seem to be defined correctly.
--
Posted via 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---