對於/login
我的應用程序工作正常/登錄,但/login?user="something"
giving 500
設計:用PARAM給`未定義的方法stringify_keys`
我使用設計的寶石
的routes.rb
devise_for :users, :controllers => { :sessions => 'devise/sessions'}, :skip => [:sessions] do
get '/login' => "devise/sessions#new", :as => :new_user_session
end
錯誤:
Completed 500 Internal Server Error in 263ms
NoMethodError (undefined method `stringify_keys' for "\"something\"":String):
Rendered /usr/local/rvm/gems/ruby-1.9.2-head/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.6ms)
Rendered /usr/local/rvm/gems/ruby-1.9.2-head/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.7ms)
Rendered /usr/local/rvm/gems/ruby-1.9.2-head/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.9ms)
你有沒有嘗試過的查詢字符串不帶引號?例如'/ login?user = something' – iain
是的'/ login?user = something'也出現同樣的錯誤 –
解決了這個問題我已經覆蓋了設計會話控制器。 –