Okay, I answered my own question. I can do:
<%= @recipe.description %>
Awesome!
Dave wrote:> Hi there, I have a VERY newbie question about replacing the scaffolding
> code in show.rhtml, which looks like this:
>
>
> <% for column in Recipe.content_columns %>
> <strong><%= column.human_name %>:</strong> <%=
> @recipe.send(column.name) %><br /><br />
> <% end %>
>
> With this format I can''t really get to each individual item in the
> recipe. I want to do something like:
>
> <% for recipe in @recipes %>
> <div>
> <h2><%= recipe.description %></h2>
> </div>
> <% end %>
>
> My controller looks like this:
>
> def show
> name = Recipe.find(params[:id])
> end
>
> Any ideas? Thanks in advance!
>
> Dave
--
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
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
-~----------~----~----~----~------~----~------~--~---