0
我在設計中使用Ruby on Rails 3併發送確認電子郵件。電子郵件正常工作(就發送而言),但當我點擊確認我的帳戶鏈接時,它會生成錯誤。
任何人都可以點亮一些光線,或者至少讓我指出正確的方向是什麼/如何解決這個問題?RoR - 設計可確認的電子郵件錯誤
這是我在日誌中看到的錯誤:
Started GET "https://stackoverflow.com/users/confirmation?confirmation_token=qKvZWHgj6ncYAyuQq3e1" for 127.0.0.1 at 2012-08-15 20:57:11 +0300
Processing by ConfirmationsController#show as HTML
Parameters: {"confirmation_token"=>"qKvZWHgj6ncYAyuQq3e1"}
User Load (9.0ms) SELECT "users".* FROM "users" WHERE "users"."confirmation_token" = 'qKvZWHgj6ncYAyuQq3e1' LIMIT 1
Completed 500 Internal Server Error in 35920ms
NoMethodError (undefined method `only_if_unconfirmed' for #):
app/controllers/confirmations_controller.rb:58:in `with_unconfirmed_confirmable'
app/controllers/confirmations_controller.rb:40:in `show'
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.5/lib/action_dispatch/middleware/templates/rescues/_trace.erb (8.0ms)
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.5/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.0ms)
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.5/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (4479.3ms)
我覈實,在URL中的令牌是該用戶在數據庫的精確匹配。
您是否以任何方式定製設計?或重寫任何控制器? – 2012-08-15 22:48:55
是的。我知道這是我做的,但我想知道在哪個方向看。更糟的情況是,我可以將其刪除並重新安裝。 – purplerice 2012-08-18 18:02:38