Sha256: a2b5cbeb4953831e4a3a3a7f24607f1c5e14a0485d310ece14dd7fa145bbfddd

Contents?: true

Size: 532 Bytes

Versions: 4

Compression:

Stored size: 532 Bytes

Contents

class Ckeditor::AttachmentFile < Ckeditor::Asset
  has_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(/^\./, '')
      "/assets/quic_cms/ckeditor/filebrowser/images/thumbs/#{extname}.gif"
	  end
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
quic_cms-0.1.4 app/models/ckeditor/attachment_file.rb
quic_cms-0.1.3 app/models/ckeditor/attachment_file.rb
quic_cms-0.1.2 app/models/ckeditor/attachment_file.rb
quic_cms-0.1.1 app/models/ckeditor/attachment_file.rb