Skip to content

Commit 2ce49af

Browse files
committed
add force option to all generators
1 parent 5351b8b commit 2ce49af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/generators/ruby_ui/component_generator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def copy_js_files
3535

3636
js_controller_file_paths.each do |file_path|
3737
controller_file_name = file_path.split("/").last
38-
copy_file file_path, Rails.root.join("app/javascript/controllers/ruby_ui", controller_file_name)
38+
copy_file file_path, Rails.root.join("app/javascript/controllers/ruby_ui", controller_file_name), force: options["force"]
3939
end
4040

4141
# Importmap doesn't have controller manifest, instead it uses `eagerLoadControllersFrom("controllers", application)`
@@ -69,7 +69,7 @@ def js_controller_file_paths = Dir.glob(File.join(component_folder_path, "*.js")
6969

7070
def install_components_dependencies(components)
7171
components&.each do |component|
72-
run "bin/rails generate ruby_ui:component #{component}"
72+
run "bin/rails generate ruby_ui:component #{component} --force #{options["force"]}"
7373
end
7474
end
7575

0 commit comments

Comments
 (0)