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
30 31 32 33 34 35 36 37 |
# File 'lib/generators/devise/controllers_generator.rb', line 30 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
39 40 41 |
# File 'lib/generators/devise/controllers_generator.rb', line 39 def show_readme readme "README" if behavior == :invoke end |