class Ckeditor::Generators::PunditPolicyGenerator
Public Class Methods
source_root()
click to toggle source
# File lib/generators/ckeditor/pundit_policy_generator.rb, line 10 def self.source_root @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates')) end
Public Instance Methods
copy_policy_files()
click to toggle source
copy configuration
# File lib/generators/ckeditor/pundit_policy_generator.rb, line 15 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