- rails c
- terminalで
params
とうつと
[25] pry(#<UsersController>)> params
=> <ActionController::Parameters {"authenticity_token"=>"902JNry6DuZRLcnlICGd4c47okqQ+vX8Dhk/foMtzC+1GKpPFjZ5JyJV4fS+NNay7A43/5aZChsH/FKPnGUnQQ==", "user"=><ActionController::Parameters {"name"=>"aki", "email"=>"aki", "password"=>"aki"} permitted: false>, "controller"=>"users", "action"=>"create"} permitted: false>
その後params.require(:name, :email, :password)
26] pry(#<UsersController>)> params.permit(:name, :email, :password)
Unpermitted parameters: :authenticity_token, :user
=> <ActionController::Parameters {} permitted: true>
となりました。
結局パラメータに入っていなさそうな気がしている。