Class: RocketCms::AdminGenerator

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

Instance Method Summary collapse

Methods included from Generators::Utils::InstanceMethods

#ask_for, #display

Instance Method Details

#installObject



14
15
16
17
18
19
# File 'lib/generators/rocket_cms/admin_generator.rb', line 14

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