I want to do something in the spirit of:
?> c=Category.find_by_id(1)
=> #<Category:0xb70bdee0
@attributes={"name"=>"food",
"id"=>"1"}>>> c.inspect
=> "#<Category:0xb70bdee0
@attributes={\"name\"=>\"food\",
\"id\"=>\"1\"}>"
Just to kick out all the @category instance fields, but from the show
view of recipes, which belongs to a category.
So, from the recipes controller I''m fairly confident that I have
"this"
category instance, it''s just a matter of putting in what the views/
categories/show.rhtml does into views/recipes/show.rhtml to know which
category a recipe belongs to.
thanks,
Thufir
--~--~---------~--~----~------------~-------~--~----~
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
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---