Controller in subfolder help

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
I changed routes.rb to look like this:

map.resources :books

map.namespace :admin do |admin|
admin.resources :books

But i am having problems with the actions inside index.hmtl.erb. This
is my view(scaffold):

<% for book in @books %>

<%=h book.title %> <%=h book.description %> <%= link_to 'Show', book %> <%= link_to 'Edit', edit_admin_book_path(book) %> <%= link_to 'Destroy', book, :confirm => 'Are you sure?', :method => :delete %> <% 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.

Hi Kostas L.

Read this thread


Thank u very much Sijo that really helped!! I totally understood what
should i do!