Hi guys,
i''ve created a scaffold in an admin folder. the folders are app/
controllers/admin/books_controller and app/views/admin/index, new
etc...
I changed routes.rb to look like this:
...
map.resources :books
....
map.namespace :admin do |admin|
admin.resources :books
end
...
But i am having problems with the actions inside index.hmtl.erb. This
is my view(scaffold):
...
<% for book in @books %>
<tr>
<td><%=h book.title %></td>
<td><%=h book.description %></td>
<td><%= link_to ''Show'', book %></td>
<td><%= link_to ''Edit'',
edit_admin_book_path(book) %></td>
<td><%= link_to ''Destroy'', book, :confirm =>
''Are you
sure?'', :method => :delete %></td>
</tr>
<% end %>
...
<%= link_to ''New book'', new_admin_book_path %>
''New_book'' and ''Edit'' works but others does
not work.When i change in
''Show'' action the book to admin_book(helper method) i get an
error.
What changes do i have to make to the code to make it work??
Thanx in advance
Kostas L.