每當我使用:Rails的拋出錯誤使用redirect_to的當:回
redirect_to :back
在我的Rails控制器
,我得到以下錯誤:
undefined method `object_url' for SubmissionController:0xb7a37764
我會粘貼下面以及應用程序跟蹤:
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
__send__' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/polymorphic_routes.rb:112:in
polymorphic_url' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:628:inurl_for' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1085:in
redirect_to' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1080:in `redirect_to'app/controllers/submission_controller.rb:38:in `show'
我很確定它不是語法錯誤,而是更深層的東西。也許在更新或其他事情中發生了問題。任何想法將不勝感激!
感謝您的期待。