Class: TamSelect::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- TamSelect::Generators::InstallGenerator
- Defined in:
- lib/generators/tam_select/install_generator.rb
Instance Method Summary collapse
- #copy_controller_concern ⇒ Object
- #copy_helper ⇒ Object
- #copy_javascript ⇒ Object
- #copy_remote_controller ⇒ Object
- #copy_simple_form_input ⇒ Object
- #show_tailwind_instruction ⇒ Object
Instance Method Details
#copy_controller_concern ⇒ Object
19 20 21 |
# File 'lib/generators/tam_select/install_generator.rb', line 19 def copy_controller_concern copy_file "lib/generators/tam_select/templates/tam_select_paginatable.rb", "app/controllers/concerns/tam_select_paginatable.rb" end |
#copy_helper ⇒ Object
27 28 29 |
# File 'lib/generators/tam_select/install_generator.rb', line 27 def copy_helper copy_file "lib/generators/tam_select/templates/tam_select_helper.rb", "app/helpers/tam_select_helper.rb" end |
#copy_javascript ⇒ Object
10 11 12 13 |
# File 'lib/generators/tam_select/install_generator.rb', line 10 def copy_javascript copy_file "src/tam-select.js", "app/javascript/tam_select/tam_select.js" copy_file "lib/generators/tam_select/templates/tam_select_controller.js", "app/javascript/controllers/tam_select_controller.js" end |
#copy_remote_controller ⇒ Object
23 24 25 |
# File 'lib/generators/tam_select/install_generator.rb', line 23 def copy_remote_controller copy_file "lib/generators/tam_select/templates/tam_select_remote_controller.rb", "app/controllers/tam_select_remote_controller.rb" end |
#copy_simple_form_input ⇒ Object
15 16 17 |
# File 'lib/generators/tam_select/install_generator.rb', line 15 def copy_simple_form_input copy_file "lib/generators/tam_select/templates/tam_select_input.rb", "app/inputs/tam_select_input.rb" end |
#show_tailwind_instruction ⇒ Object
31 32 33 34 35 36 |
# File 'lib/generators/tam_select/install_generator.rb', line 31 def show_tailwind_instruction say "\ntam_select installed.", :green say "Tailwind CSS 4 scans app/javascript automatically in most Rails setups." say "If your setup uses explicit sources, add:" say '@source "../../javascript/tam_select/**/*.js";' end |