【发布时间】:2015-02-27 23:03:03
【问题描述】:
我是 Rails 的新手,不知道如何处理这个错误,请帮助(解释):
Devise::Registrations#create 中的 ActionController::UrlGenerationError
显示 /home/ubuntu/workspace/mamchut418/app/views/devise/mailer/confirmation_instructions.html.erb 其中第 5 行提出:
没有路由匹配 {:action=>"create", :confirmation_token=>"24GGcednzrEXEzaR82AC", :controller=>"devise/confirmations"} 缺少必需的键:[:locale]
提取的源代码(第 5 行附近):
3 | <p><%= _('You can confirm your account email through the link below:') %>p>
4 |
5 | <p><%= link_to _('Confirm my account'), confirmation_url(@resource, confirmation_token: @token) %></p>
app/views/devise/mailer/confirmation_instructions.html.erb:5:in `_app_views_devise_mailer_confirmation_instructions_html_erb___1326125006769773887_55918960'
请求
参数:
{"utf8"=>"✓",
"authenticity_token"=>"pY7ApWH/WTOVTFGifeV7QbubuNch/EzCJWjaXg7t+i5iYpI=",
"user"=>{"email"=>"qwerty@gmail.com",
"password"=>"[FILTERED]",
"password_confirmation"=>"[FILTERED]"},
"commit"=>"Registrovať",
"locale"=>"sk"}
会话转储
_csrf_token: "pY7ApWH/WTkukoOVTFGifeV7QNch/EzCJWjaXg7t+i5iYpI="
locale: "sk"
session_id: "01f6f1f89089a5ef29326e80b0d44f79"
【问题讨论】:
标签: ruby-on-rails devise ruby-on-rails-4.1 rails-i18n devise-confirmable