Class: Ckeditor::AttachmentFile

Inherits:
Asset
  • Object
show all
Defined in:
lib/generators/ckeditor/templates/models/mongoid/paperclip/ckeditor/attachment_file.rb,
lib/generators/ckeditor/templates/models/mongoid/carrierwave/ckeditor/attachment_file.rb,
lib/generators/ckeditor/templates/models/active_record/paperclip/ckeditor/attachment_file.rb,
lib/generators/ckeditor/templates/models/active_record/carrierwave/ckeditor/attachment_file.rb

Instance Method Summary collapse

Methods included from Orm::ActiveRecord::AssetBase

included

Methods included from Backend::Paperclip

included

Methods included from Orm::Mongoid::AssetBase

included

Instance Method Details

#url_thumbObject



9
10
11
12
13
14
# File 'lib/generators/ckeditor/templates/models/mongoid/paperclip/ckeditor/attachment_file.rb', line 9

def url_thumb
  @url_thumb ||= begin
    extname = File.extname(filename).gsub(/^\./, '')
    "/javascripts/ckeditor/filebrowser/images/thumbs/#{extname}.gif"
  end
end