module Admin
  class PolicyGenerator < Admin::GeneratorBase
    source_root File.expand_path('../templates', __FILE__)

    def copy_policy_file
      prefix = File.join "app", "policies", module_path
      path = File.join prefix, "#{singularized_name}_policy.rb"

      template "policy.rb", path
    end
  end
end
