1
我試圖延長間隙控制器通過一些其他形式的元素擴展間隙寶石控制器
我目前已經做了以下,但它似乎沒有奏效,並返回ActiveModel::ForbiddenAttributesError
class UsersController < Clearance::UsersController
private
def user_from_params
params.require(:user).permit(:first_name, :last_name, :mobile, :email, :password, :password_confirmation)
end
end
你可以分享處理'create'和'update'操作的控制器代碼嗎? –
https://github.com/thoughtbot/clearance/blob/master/app/controllers/clearance/users_controller.rb –
似乎已經更新到user_params –