Class: Upmin::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_routeObject



13
14
15
# File 'lib/generators/upmin/install_generator.rb', line 13

def add_route
  route "mount Upmin::Engine => '/admin'"
end

#copy_initializerObject



9
10
11
# File 'lib/generators/upmin/install_generator.rb', line 9

def copy_initializer
  template 'initializer.rb', 'config/initializers/upmin.rb'
end

#messagesObject



17
18
19
20
# File 'lib/generators/upmin/install_generator.rb', line 17

def messages
  log "\n  # Global configuration can be edited in 'config/initializers/upmin.rb'\n"
  log "\n  # You can access Upmin at: '/admin'. Modify config/routes.rb if this conflicts with an existing route.\n\n"
end