Files
grecia/config/initializers/ckeditor.rb
Javi Martín 43e83889ff Simplify CKEditor authorization
We can use the `config.authorize_with` option, so we don't need to copy
the controller in order to load and authorize resource.

Besides, only administrators can upload images, so we don't need to
track the image's user id.
2018-09-12 12:35:28 +02:00

13 lines
486 B
Ruby

Ckeditor.setup do |config|
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'ckeditor/orm/active_record'
config.authorize_with :cancan
config.assets_languages = Rails.application.config.i18n.available_locales.map{|l| l.to_s.downcase}
config.assets_plugins = %w[copyformatting tableselection scayt wsc]
end