Skip to content

Commit 9444768

Browse files
ihabadhamclaude
andcommitted
Refactor: append --skip-javascript inline instead of mutating rails_options
Follows coderabbit's suggestion to avoid mutating the @rails_options instance variable, preventing potential option duplication issues. - More functional/immutable approach - Cleaner and more explicit intent - Prevents potential future bugs from state mutation 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
1 parent 330ba11 commit 9444768

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rakelib/shakapacker_examples.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ namespace :shakapacker_examples do # rubocop:disable Metrics/BlockLength
2929
task example_type.gen_task_name_short => example_type.clobber_task_name do
3030
puts "Running shakapacker_examples:#{example_type.gen_task_name_short}"
3131
mkdir_p(example_type.dir)
32-
example_type.rails_options += " --skip-javascript"
33-
sh_in_dir(examples_dir, "rails new #{example_type.name} #{example_type.rails_options}")
32+
sh_in_dir(examples_dir, "rails new #{example_type.name} #{example_type.rails_options} --skip-javascript")
3433
sh_in_dir(example_type.dir, "touch .gitignore")
3534
sh_in_dir(example_type.dir,
3635
"echo \"gem 'react_on_rails', path: '#{relative_gem_root}'\" >> #{example_type.gemfile}")

0 commit comments

Comments
 (0)