Re: Routes: How would default routes be defined manually?

bourne
Mon, 20 Dec 2010 07:50:41 -0000

Thank you! Your post is really helpful.

As mentioned above, I just want to understand how I would declare the 7 REST
routes if they would not have been declared for me, e.g. new1 (add in my
example), edit1, ...
If I declare add as a collection route, this statement throws an error
<%= link_to ''Add Priority'', add_*priority*_path %>
(taken from
originally created code :  <%= link_to ''New Priority'',
new_priority_path %>)

<%= link_to ''Add Priority'', add_*priorities*_path %>
works as expected.

My original question was: what is my definition missing compared to the
original new?


Second, I find this very interesting: get ''add'' =>
''priorities#create'', :as
=> my_custom_add
In this form I get an error, the same with :my_custom_add.