Skip to content

Commit e9ee790

Browse files
authored
Add --reset option to bin/setup (rails#54952)
Makes it easier to zero out a database and load seeds during development.
1 parent 49561bb commit e9ee790

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

railties/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Add --reset option to bin/setup which will call db:reset as part of the setup.
2+
3+
*DHH*
4+
15
* Add RuboCop cache restoration to RuboCop job in GitHub Actions workflow templates.
26

37
*Lovro Bikić*

railties/lib/rails/generators/rails/app/templates/bin/setup.tt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ FileUtils.chdir APP_ROOT do
3131

3232
puts "\n== Preparing database =="
3333
system! "bin/rails db:prepare"
34+
system! "bin/rails db:reset" if ARGV.include?("--reset")
3435
<% end -%>
3536

3637
puts "\n== Removing old logs and tempfiles =="

0 commit comments

Comments
 (0)