7
8
9
10
11
12
13
14
15
|
# File 'lib/generators/rondo_form/install_generator.rb', line 7
def copy_the_javascript
copy_file "nested_rondo_controller.js", "app/javascript/controllers/nested_rondo_controller.js", force: true
if (Rails.root.join("app/javascript/controllers/index.js")).exist?
append_to_file "app/javascript/controllers/index.js",
%(import NestedRondoController from "./nested_rondo_controller"\napplication.register("nested-rondo", NestedRondoController)\n)
else
say %(Couldn't find "app/javascript/controllers/index.js".), :red
end
end
|