Class: ModelExplorer::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ModelExplorer::InstallGenerator
- Defined in:
- lib/generators/model_explorer/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_model_explorer_routes ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/generators/model_explorer/install_generator.rb', line 15 def add_model_explorer_routes return unless .routes? route <<~ROUTE mount ModelExplorer::Engine, at: "/model_explorer" ROUTE end |
#copy_initializer ⇒ Object
11 12 13 |
# File 'lib/generators/model_explorer/install_generator.rb', line 11 def copy_initializer template "model_explorer.rb", "config/initializers/model_explorer.rb" end |