验证失败:电子邮件不能为空,密码不能为空白DeviseCreateAdminUsers

时间:2015-02-06 05:43:37

标签: ruby-on-rails ruby devise activeadmin

我已经回顾了之前的所有帖子和答案,但此时却很难过。任何帮助赞赏。在运行ActiveAdmin,Rails 4,Ruby 2.0所有最新稳定版本的迁移时会发生这种情况。

==  DeviseCreateAdminUsers: migrated (0.1006s) ================================

rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Validation failed: Email can't be blank, Password can't be blank ~/db/migrate/20131108204716_devise_create_admin_users.rb:5:in `migrate'
ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Password can't be blank
~/db/migrate/20131108204716_devise_create_admin_users.rb:5:in `migrate'
  • Rails 4.0.2
  • ruby​​ 2.1.5p273
  • 设计(3.2.4)
  • activeadmin 1.0.0.pre from git://github.com/gregbell/active_admin.git(at master)

我已将建议修复程序添加到 admin_user.rb 但仍然失败:

controller do
  def permitted_params
    params.permit admin_user: [:email, :password, :password_confirmation]
  end
end

0 个答案:

没有答案