For my project, I have been trying to create the resources with the
following urls:
hxxp://domain/projects/active [for active projects]
hxxp://domain/projects/archived [for archived projects]
Subsequently, I created the public methods active and archived in the
ProjectController and created the related views.
I also added the following route in the routes.rb
map.connect “:controller/:action”
to the already existing default routes.
However when I click on the links for the active and archived
projects, it throws me an error ‘Couldn’t find Project with
ID=active’.
Am I missing something? Or is this sort of thing not permitted and we
are expected to use only the 7 golden actions?
I had completely forgotten about the default routes created by the
map.resources method. To move around the error, I had to just add my
route right at the top.
Mark,
Many thanks for the help. Your tip worked perfectly!
Although I did read the API, I missed the fine print Many thanks
once again - will be more careful now on and do my homework before
posting a question to the group!