ruby - Rails Routes deprecation warning -


i have rails 4.2.1 application , got deprecation warning in routes.rb

deprecation warning: defining route `to` controller without action deprecated. please change `to: :super_admin` `controller: :super_admin`. (called block in <top (required)> 

routes looks this:

 "/super_admin(/:action(/:id))", :to => "super_admin", :constraints => {:subdomain => "admin"}  "/", :to => redirect("/super_admin"), :constraints => {:subdomain => "admin"}  "/super_admin(/:action(/:id))", :to => "super_admin", :constraints => {:subdomain => "admin.staging"}  "/", :to => redirect("/super_admin"), :constraints => {:subdomain => "admin.staging"}  "/super_admin(/:action(/:id))", :to => redirect("/") 

what have change?

use controller: :super_admin instead of to: :super_admin. mentioned in deprecation warning message.


Comments