TFM-Agency/active_entry

View on GitHub
lib/generators/policy/policy_generator.rb

Summary

Maintainability
A
0 mins
Test Coverage
class PolicyGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('templates', __dir__)

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