Class: Pundit::Generators::PolicyGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/pundit/policy/policy_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_policyObject



6
7
8
# File 'lib/generators/pundit/policy/policy_generator.rb', line 6

def create_policy
  template 'policy.rb', File.join('app/policies', class_path, "#{file_name}_policy.rb")
end