Sha256: 577e49bf2826d9692576daf8870eb9b1738bad299dd0085df0dc1e7aa750bd23
Contents?: true
Size: 599 Bytes
Versions: 2
Compression:
Stored size: 599 Bytes
Contents
class Ckeditor::AttachmentFile < Ckeditor::Asset has_mongoid_attached_file :data, :url => "/ckeditor_assets/attachments/:id/:filename", :path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename" validates_attachment_size :data, :less_than => 100.megabytes validates_attachment_presence :data def url_thumb @url_thumb ||= begin extname = File.extname(filename).gsub(/^\./, '') "/javascripts/ckeditor/filebrowser/images/thumbs/#{extname}.gif" end end end
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ckeditor-3.6.0 | lib/generators/ckeditor/templates/models/mongoid/ckeditor/attachment_file.rb |
ckeditor-3.6.0 | test/tmp/app/models/ckeditor/attachment_file.rb |