我有以下设置:轨道4 +设计 - 未经许可参数更新用户的帐户时
的routes.rb
和RegistrationController
:
class RegistrationsController < Devise::RegistrationsController
def update
...
end
def user_params
params.require(:user).permit(:tw_account, :fb_account, :current_password, :password, :password_confirmation)
end
end
但每次当时间我尝试更新用户的数据,我收到以下错误消息:
不允许的参数:tw_account,fb_account
但是,当我创建这两个领域一个新的帐户,他们得救了。如何让他们更新能力?
谢谢
您必须查看此主题http://stackoverflow.com/questions/16379554/strong-parameters-with-rails-4-0-and-devise 此主题必须为您提供帮助。 – 2014-09-06 23:18:50