I have model/controller called notification.
I want to make a new url so that I can access it by:
/notifications/my_new_url?id=4 and have that page go to view my_new_url.html.erb
however, it always keeps going to show method:
This is in my routes.rb
map.resources :notifications
map.connect 'notifications/get',
:controller => 'notifications',
:action => 'show'
map.connect 'notifications/my_new_url',
:controller => 'notifications',
:action => 'my_new_url'
Please assist me…I’ve been stuck on this for a while
You need to map the URL to a controller and action combination. But your action can render the view. You also need need to map the specialized URLs before URLs with wildcards. So do this: