class Contour::InstallGenerator

Public Instance Methods

copy_initializer() click to toggle source

class_option :orm

# File lib/generators/contour/install/install_generator.rb, line 7
def copy_initializer
  template "contour.rb", "config/initializers/contour.rb"
end
install_devise() click to toggle source
# File lib/generators/contour/install/install_generator.rb, line 11
def install_devise
  generate("devise:install")
  model_name = ask("What would you like the user model to be called? [user]")
  model_name = "user" if model_name.blank?
  generate("devise", model_name)
  route "devise_for :#{model_name}s, controllers: { registrations: 'contour/registrations', sessions: 'contour/sessions', passwords: 'contour/passwords', confirmations: 'contour/confirmations', unlocks: 'contour/unlocks' }, path_names: { sign_up: 'register', sign_in: 'login' }"
end
show_readme() click to toggle source
# File lib/generators/contour/install/install_generator.rb, line 19
def show_readme
  readme "README" if behavior == :invoke
end