Track rails 2 to rails 4 "map.connect"

i This route on rails 2.3.14, which I want to convert to rails 4.0.3

map.connect ': controller /: action /: id'

map.connect ': controller /: action /: id .: format'

I try to use a match, but give me an error.

+3
source share
2 answers

ok do it

 match ':controller/:action/:id', via: [:get, :post]
+6
source

If all of this is possible, consider refactoring the route file, not this. In most cases, you will know all the actions that a user can do on your site, and you should limit this.

catch, get, . http://darwinweb.net/articles/the-problem-with-rails-catch-all-route

, . @ParitoshPiplewar answer

0

All Articles