File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 14
14
end
15
15
end
16
16
CODE
17
- gsub_file 'config/initializers/action_mailer.rb' ,
18
- /ExampleApp/ ,
19
- Rails . application . class . parent . to_s
17
+
18
+ rails_parent =
19
+ if Rails . version . to_f >= 6.0
20
+ Rails . application . class . module_parent . to_s
21
+ else
22
+ Rails . application . class . parent . to_s
23
+ end
24
+
25
+ gsub_file 'config/initializers/action_mailer.rb' , /ExampleApp/ , rails_parent
20
26
21
27
copy_file 'spec/support/default_preview_path'
22
28
chmod 'spec/support/default_preview_path' , 0755
23
- gsub_file 'spec/support/default_preview_path' ,
24
- /ExampleApp/ ,
25
- Rails . application . class . parent . to_s
29
+ gsub_file 'spec/support/default_preview_path' , /ExampleApp/ , rails_parent
30
+
26
31
if skip_active_record?
27
32
comment_lines 'spec/support/default_preview_path' , /active_record/
28
33
comment_lines 'spec/support/default_preview_path' , /active_storage/
You can’t perform that action at this time.
0 commit comments