Class: Devise::Generators::ControllersGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Devise::Generators::ControllersGenerator
- Defined in:
- lib/generators/devise/controllers_generator.rb
Constant Summary collapse
- CONTROLLERS =
%w(confirmations passwords registrations sessions unlocks omniauth_callbacks).freeze
Instance Method Summary collapse
Instance Method Details
#create_controllers ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/generators/devise/controllers_generator.rb', line 32 def create_controllers @scope_prefix = scope.blank? ? '' : (scope.camelize + '::') controllers = [:controllers] || CONTROLLERS controllers.each do |name| template "#{name}_controller.rb", "app/controllers/#{scope}/#{name}_controller.rb" end end |
#show_readme ⇒ Object
41 42 43 |
# File 'lib/generators/devise/controllers_generator.rb', line 41 def show_readme readme "README" if behavior == :invoke end |