Class: Protected::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_protected_routesObject



12
13
14
15
16
17
18
19
# File 'lib/generators/protected/install/install_generator.rb', line 12

def add_protected_routes
  devise_route  = <<EOF

  # Ensure you place your root path above this engine.
  mount Protected::Engine => "/"
EOF
  route devise_route
end

#copy_initializerObject



8
9
10
# File 'lib/generators/protected/install/install_generator.rb', line 8

def copy_initializer
  template "devise.rb", "config/initializers/devise.rb"
end

#show_readmeObject



21
22
23
# File 'lib/generators/protected/install/install_generator.rb', line 21

def show_readme
  readme "README" if behavior == :invoke
end