Reputation: 10412
It seems there is no URL helper generated automatically when you apply custom.
So below is what is defined in my routes.rb
file but when I do rake routes
I don't have any URL helper generated at all.
get "events/display_event/:id", :to => "events#display_event"
It seems it is generated only for resources in the routes.
Is there a way to generate this automatically or do I have to manually specify without using the helper?
If it has to be done manually in the view, what is the best approach for this?
Upvotes: 3
Views: 988
Reputation: 2941
This should do it.
get "events/display_event/:id" => "events#display_event", as: :display_event
Upvotes: 5