Class: TurboFlow::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- TurboFlow::InstallGenerator
- Defined in:
- lib/generators/turbo_flow/install/install_generator.rb
Instance Method Summary collapse
- #create_initializer ⇒ Object
- #display_post_install_message ⇒ Object
- #update_application_layout ⇒ Object
Instance Method Details
#create_initializer ⇒ Object
9 10 11 |
# File 'lib/generators/turbo_flow/install/install_generator.rb', line 9 def create_initializer template "turboflow.rb", "config/initializers/turboflow.rb" end |
#display_post_install_message ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/generators/turbo_flow/install/install_generator.rb', line 20 def say "\n" + "="*60, :blue say "TurboFlow installation complete!", :green say "="*60 + "\n", :blue say "\nLayout Updates:", :yellow say " • turboflow_meta_tags added to <head>\n" say "\nUsage Examples:", :yellow say " • Link with transition:" say " • <%= link_flow_to 'About', about_path, flow: :slide %>\n" say " • Button with transition:" say " • <%= button_flow_to 'Submit', path, flow: :zoom %>\n" say " • Available transitions: fade, slide, zoom, flip, morph\n" say "\nConfiguration:", :yellow say " • Edit config/initializers/turboflow.rb to customize defaults\n" say "\nDocumentation:", :yellow say " • https://github.com/Nickiam7/turboflow\n" end |
#update_application_layout ⇒ Object
13 14 15 16 17 18 |
# File 'lib/generators/turbo_flow/install/install_generator.rb', line 13 def update_application_layout return unless File.exist?(application_layout_path) # No longer replacing body tags - just use regular <body> tags end |