Class: RailsAdmin::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Generators::Utils::InstanceMethods
Defined in:
lib/generators/rails_admin/install_generator.rb

Instance Method Summary collapse

Methods included from Generators::Utils::InstanceMethods

#ask_for, #display

Instance Method Details

#installObject



12
13
14
15
16
# File 'lib/generators/rails_admin/install_generator.rb', line 12

def install
  namespace = ask_for('Where do you want to mount rails_admin?', 'admin', _namespace)
  route("mount RailsAdmin::Engine => '/#{namespace}', as: 'rails_admin'")
  template 'initializer.erb', 'config/initializers/rails_admin.rb'
end