Sha256: 14ff5d5c68d5e16750aadfa79fe0acbdc1f9497e95348087ad819d9922a743d8

Contents?: true

Size: 601 Bytes

Versions: 3

Compression:

Stored size: 601 Bytes

Contents

class Ckeditor::Picture < Ckeditor::Asset
  has_attached_file :data,
                    :url  => "/ckeditor_assets/pictures/:id/:style_:basename.:extension",
                    :path => ":rails_root/public/ckeditor_assets/pictures/:id/:style_:basename.:extension",
                    :styles => { :content => '800>', :thumb => '118x100#' },
                    :convert_options => { :all => '-auto-orient -quality 70 -interlace Plane' }

  validates_attachment_size :data, :less_than => 2.megabytes
  validates_attachment_presence :data

  def url_content
    url(:content)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rdcms-1.0.28 app/models/ckeditor/picture.rb
rdcms-1.0.27 app/models/ckeditor/picture.rb
rdcms-1.0.26 app/models/ckeditor/picture.rb