Class: ActionAuthorizer::AuthorizerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
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_fileObject



12
13
14
# File 'lib/generators/action_authorizer/authorizer/authorizer_generator.rb', line 12

def create_authorizer_file
  template 'authorizer.rb', File.join('app/authorizers', controller_class_path, "#{controller_file_name}_authorizer.rb")
end

#create_authorizer_spec_fileObject



16
17
18
# File 'lib/generators/action_authorizer/authorizer/authorizer_generator.rb', line 16

def create_authorizer_spec_file
  template 'authorizer_spec.rb', File.join('spec/authorizers', controller_class_path, "#{controller_file_name}_authorizer_spec.rb")
end