使用Rails 4,设计,简单的形式。读了很多关于这个,但肯定没有足够的经验。我做了RegistrationController,自定义视图也存在。 有了这个,我有密码确认没有问题,但我所有的PARAMS是不允许的:在没有密码确认的情况下设计更新附加属性。
def update_resource(resource, params)
resource.update_without_password(params)
end
据我所知,这应该是决定,但对我没有任何影响:
def configure_account_update_params
devise_parameter_sanitizer.for(:account_update) do |u|
u.permit(:username, :first_name, :last_name, :price_plan_id, :email_notify, :msg_notify,
:email, :password, :password_confirmation, :current_password)
end
end
也许有人能写出关于它的整个概念性答案吗?
你在注册控制器中放了before_filter:configure_permitted_parameters吗? –
@DileepNandanam这个任务迭代太多了。你是对的,在这里我忘了说。非常感谢,一切正常。在我的情况下,回调函数是'before_filter:configure_account_update_params,只有:[:update]'随意写答案,我会接受它。 – nobilik