This is the default scaffolding for list.rhtml:
[code]
<h1>Listing <%= @scaffold_plural_name %></h1>
<table>
<tr>
<% for column in @scaffold_class.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for entry in
instance_variable_get("@#{@scaffold_plural_name}") %>
<tr>
<% for column in @scaffold_class.content_columns %>
<td><%= entry.send(column.name) %></td>
<% end %>
<td><%= link_to "Show", :action =>
"show#{@scaffold_suffix}", :id
=> entry.id %></td>
<td><%= link_to "Edit", :action =>
"edit#{@scaffold_suffix}", :id
=> entry.id %></td>
<td><%= link_to "Delete", :action =>
"destroy#{@scaffold_suffix}",
:id => entry.id %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to "New #{@scaffold_singular_name}", :action =>
"new#{@scaffold_suffix}" %>
[/code]
For some reason whenever I click on the the "Show", "Edit",
or "Destroy"
links, I get a "Couldn''t find Post without an ID" error. THat
seems odd
because I have the entry.id right there, and for some reason it''s not
linking to http://localhost:3000/blog/show/1, it just links to
/blod/show.
Any ideas?
--
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?hl=en
-~----------~----~----~----~------~----~------~--~---