Class: ActionAuthorizer::AuthorizerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ActionAuthorizer::AuthorizerGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/action_authorizer/authorizer/authorizer_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#create_authorizer_file ⇒ Object
12 13 14 |
# File 'lib/generators/action_authorizer/authorizer/authorizer_generator.rb', line 12 def template 'authorizer.rb', File.join('app/authorizers', controller_class_path, "#{controller_file_name}_authorizer.rb") end |
#create_authorizer_spec_file ⇒ Object
16 17 18 |
# File 'lib/generators/action_authorizer/authorizer/authorizer_generator.rb', line 16 def template 'authorizer_spec.rb', File.join('spec/authorizers', controller_class_path, "#{controller_file_name}_authorizer_spec.rb") end |