File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 39
39
40
40
* DHH*
41
41
42
- * Add script folder and generator
42
+ * Add a ` script ` folder to applications, and a scripts generator.
43
43
44
- Add a new script default folder to hold your one-off or general purpose
45
- scripts, such as data migration scripts, cleanup scripts, etc.
44
+ The new ` script ` folder is meant to hold one-off or general purpose scripts,
45
+ such as data migration scripts, cleanup scripts, etc.
46
46
47
47
A new script generator allows you to create such scripts:
48
48
49
- ` rails generate script my_script `
49
+ ` bin/rails generate script my_script `
50
+ ` bin/rails generate script data/backfill `
50
51
51
52
You can run the generated script using:
52
53
53
- ` ruby script/my_script.rb `
54
+ ` bundle exec ruby script/my_script.rb `
55
+ ` bundle exec ruby script/data/backfill.rb `
54
56
55
57
* Jerome Dalbert* , * Haroon Ahmed*
56
58
You can’t perform that action at this time.
0 commit comments