rails consoleでDBの変更をロールバックしたい時は、sandboxオプションをつけると、コンソールを抜けた時に自動でロールバックされます。
bundle exec rails console --sandbox
More than 5 years have passed since last update.
rails consoleでDBの変更をロールバックしたい時は、sandboxオプションをつけると、コンソールを抜けた時に自動でロールバックされます。
bundle exec rails console --sandbox
Register as a new user and use Qiita more conveniently