Sha256: 4df0db6e76964e06e0358debcffefd5c4ba92444ef50045bb236cee5f08946c5
Contents?: true
Size: 559 Bytes
Versions: 9
Compression:
Stored size: 559 Bytes
Contents
require 'rails/generators' module Ckeditor module Generators class PunditPolicyGenerator < Rails::Generators::Base desc 'Generates policy files for Pundit' def self.source_root @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates')) end # copy configuration def copy_policy_files [:picture, :attachment_file].each do |model_name| template "pundit_policy/#{model_name}_policy.rb", "app/policies/ckeditor/#{model_name}_policy.rb" end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems