Sha256: d207bdd19c493b6181dd2e34f9eae0ffbcad6cf01bfd1ad9bcd7a30ac7694aeb
Contents?: true
Size: 787 Bytes
Versions: 1
Compression:
Stored size: 787 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#' } validates_attachment_presence :data validates_attachment_size :data, less_than: 2.megabytes validates_attachment_content_type :data, content_type: /\Aimage/ def url_content # url_t = (ENV['RAILS_URL'].blank? || ) ? "http://localhost:3000" : "#{ENV['RAILS_URL']}#{ENV['RAILS_RELATIVE_URL_ROOT']}" # "#{ENV['RAILS_URL'].presence || "http://localhost:3000"}#{ENV['RAILS_RELATIVE_URL_ROOT'].presence}#{url(:content)}" url(:content) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thecore-1.5.13 | app/models/ckeditor/picture.rb |