Hello :)
I generated model, view and controler for products database table
using scaffold
I try to change controler name from product to admin but I can't :( (I
didn't know how to specifi diferent controler name when use scaffold)
I controllers/s_controller.rb to controllers/admin_controller.rb
view/products directory to view admin directory
layout/products.html.erb to layout/admin.html.erb
and make some modifications
but i can't do it because there are some strange thinks
view\products\index.html
<td><%= link_to 'Show', product %></td>
<td><%= link_to 'Edit', edit_product_path(product) %></td>
<td><%= link_to 'Destroy', product, :confirm => 'Are you
sure?', :method => :delete %></td>
what are these edit_product_path functions? And why edit link is
something like
<td><a href="/products/1/edit">Edit</a></td>
and not
<td><a href="/products/edit/1">Edit</a></td>
when i try to make /admin/1/edit request I get an error that I have
not action 1, it works only with /admin/edit/1
in products controler it works both ways:
/products/1/edit
and
/products/edit/1/
Can you help me, pls :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---