I have a route with a namespace
namespace :publishers do
resources :authors
get 'books' :to => 'books'
get 'books/custom_report/:id', :to => "curriculos#custom_report"
end
Often I will have to make links in my application and I know than it`s possible to use a alias for routing like this:
<%= link_to "Books", publishers_books_path %>
I call that publishers_books_path a alias route, does this is the correct name?
Furthermore, I still not able to understand the logic with this alias naming because i can`t use for a new or a custom action like this
link_to 'Show the report', publishers_books_custom_report_path(params[:id])
I'm always get a error of undefined_method for publishers_books_custom_report_path
So there`s some questions
- First of all whats it`s the correct name of this feature in RoR?
- How I can use the custom_report as aliases to link_to? And also if i need to use some basic operations like new, update, insert?
- Can someone give me the link to the documentation to really understant that feature?
get 'books' :to => 'books'. Is that a typo in the question or the code?