Class: ModelExplorer::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/model_explorer/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_model_explorer_routesObject



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 options.routes?

  route <<~ROUTE
    mount ModelExplorer::Engine, at: "/model_explorer"

  ROUTE
end

#copy_initializerObject



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