Why does my rails rollback when I try to user.save?

前端 未结 8 1058
北荒
北荒 2020-12-12 16:17

I have installed the RailsTutorial sample app(the twitter like application) and am trying to understand why the following piece of console code does not update the database

8条回答
  •  有刺的猬
    2020-12-12 17:00

    Your validations are not passing. You can do:

    user.errors.full_messages
    

    in the console after the failed save to see why.

提交回复
热议问题