Rails 4 routing issue

I am migrating our application from 3.x to 4.0.2 and I have following
problem :


Rails 4 generates totally different routes in this case and it brakes
of our functionalities. Maybe I am not familiar with new way of creating
routes but in release notes there was nothing said about it. At least
this part of routes. How can I make these routes look like in rails 3 ?

I ran into some similar issues while upgrading some of my sites. My
problems were mainly because I wasn’t using standard resourceful routes.
The simplest way to fix this is to just specify each route manually. If
have a lot of similar patterns with other resources you could just write
function to create each route pattern.

Here is a short example:


delete ‘subscriptions’, to: ‘subscriptions’, as: :subscriptions
get ‘subscriptions/edit’, to: ‘subscriptions#edit’, as:

Rails 4 Routes :

subscriptions DELETE /subscriptions(.:format)
edit_subscriptions GET /subscriptions/edit(.:format)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs