Fel*_*lix 1 ruby ruby-on-rails ruby-on-rails-4
我有一个Rails 4.2.1应用程序,并在我的routes.rb中得到了一个弃用警告
DEPRECATION WARNING: Defining a route where `to` is a controller without an action is deprecated. Please change `to: :super_admin` to `controller: :super_admin`. (called from block in <top (required)>
Run Code Online (Sandbox Code Playgroud)
路线看起来像这样:
get "/super_admin(/:action(/:id))", :to => "super_admin", :constraints => {:subdomain => "admin"}
get "/", :to => redirect("/super_admin"), :constraints => {:subdomain => "admin"}
get "/super_admin(/:action(/:id))", :to => "super_admin", :constraints => {:subdomain => "admin.staging"}
get "/", :to => redirect("/super_admin"), :constraints => {:subdomain => "admin.staging"}
get "/super_admin(/:action(/:id))", :to => redirect("/")
Run Code Online (Sandbox Code Playgroud)
我需要改变什么?