Class: Ckeditor::Generators::ActionPolicyGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Ckeditor::Generators::ActionPolicyGenerator
- Defined in:
- lib/generators/ckeditor/action_policy_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#copy_policy_files ⇒ Object
copy configuration.
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/generators/ckeditor/action_policy_generator.rb', line 10 def self.source_root @source_root ||= File.(File.join(File.dirname(__FILE__), 'templates')) end |
Instance Method Details
#copy_policy_files ⇒ Object
copy configuration
15 16 17 18 19 |
# File 'lib/generators/ckeditor/action_policy_generator.rb', line 15 def copy_policy_files [:picture, :attachment_file].each do |model_name| template "action_policy/#{model_name}_policy.rb", "app/policies/ckeditor/#{model_name}_policy.rb" end end |