Rails 3 Custom Routes Parameters
I want something like this in my routes.rb. This isn't at all correct, but something like this:
match '/:scope/authenticate' => '%{:scope}_authentication#create'
So going to /users/authenticate would route to the create method in the users_authenticate controller.
What is the best way to do thi开发者_开发百科s in Rails 3?
Not something I've done, but does this work?
resources :users_authenticate
resources :things_authenticate
resources :admins_authenticate
match "/:scope/authenticate" => redirect("%{scope}_authenticate/create")
精彩评论