Module: Ckeditor::Backend::Dragonfly::ClassMethods

Defined in:
lib/ckeditor/backend/dragonfly.rb

Instance Method Summary collapse

Instance Method Details

#attachment_file_typesObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/ckeditor/backend/dragonfly.rb', line 10

def attachment_file_types
  @attachment_file_types ||= Ckeditor.attachment_file_types.map(&:to_sym).tap do |formats|
    # This is not ideal but Dragonfly doesn't return double
    # extensions. Having said that, the other backends
    # currently don't use attachment_file_types at all.
    [ :bz2, :gz, :lzma, :xz ].each do |f|
      formats << f if formats.include?("tar.#{f}".to_sym)
    end
  end
end

#image_file_typesObject



21
22
23
# File 'lib/ckeditor/backend/dragonfly.rb', line 21

def image_file_types
  @image_file_types ||= Ckeditor.image_file_types.map(&:to_sym)
end