module Ckeditor::Backend::Refile
Public Instance Methods
attachment_file_types()
click to toggle source
# File lib/ckeditor/backend/refile.rb, line 14 def attachment_file_types @attachment_file_types ||= Ckeditor.attachment_file_types.map(&:to_s) end
image_file_types()
click to toggle source
# File lib/ckeditor/backend/refile.rb, line 18 def image_file_types @image_file_types ||= Ckeditor.image_file_types.map(&:to_s) end
read_dimensions()
click to toggle source
# File lib/ckeditor/backend/refile.rb, line 27 def read_dimensions if model.image? && model.has_dimensions? magick = MiniMagick::Image.open(model.to_io) model.width = magick.width model.height = magick.height end end
url(*attrs)
click to toggle source
# File lib/ckeditor/backend/refile.rb, line 23 def url(*attrs) ::Refile.attachment_url(self, :data, *attrs) end