Class: Webring::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Webring::Generators::InstallGenerator
- Defined in:
- lib/generators/webring/install/install_generator.rb
Overview
Note:
You can change the mount path in your routes.rb file after installation
It mounts the Webring engine to your Rails application’s routes
Instance Method Summary collapse
-
#add_webring_routes ⇒ Object
Adds the engine mount point and widget route to the application’s routes.rb file.
-
#show_readme ⇒ Object
Displays the README with next steps after installation.
Instance Method Details
#add_webring_routes ⇒ Object
Adds the engine mount point and widget route to the application’s routes.rb file
19 20 21 22 |
# File 'lib/generators/webring/install/install_generator.rb', line 19 def add_webring_routes route "scope module: 'webring' do\n get 'widget.js', to: 'widget#show', format: 'js', as: :widget\nend\n\n" route "mount Webring::Engine => '/webring', as: 'webring'\n\n" end |
#show_readme ⇒ Object
Displays the README with next steps after installation
25 26 27 |
# File 'lib/generators/webring/install/install_generator.rb', line 25 def show_readme readme 'AFTER_INSTALL' if behavior == :invoke end |