12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/generators/chive/ckeditor_generator.rb', line 12
def manifest
gem 'ckeditor'
Rails::Generators.invoke 'ckeditor:install', ['--orm=active_record', '--backend=active_storage'], behavior: behavior
inject_into_file 'config/initializers/ckeditor.rb', after: "config.authorize_with :cancancan\n" do
<<-RUBY
# This setting uses Chive's default authorization.
config.authorize_with :chive
RUBY
end
inject_into_file 'app/controllers/application_controller.rb', after: "class ApplicationController < ActionController::Base\n" do
<<-RUBY
include Chive::UserConcerns
RUBY
end
end
|