Sha256: dc3f452f662050968b5e791186f3d3844387c8f2895b5556f673a39f35871eb3
Contents?: true
Size: 1.02 KB
Versions: 24
Compression:
Stored size: 1.02 KB
Contents
module Ckeditor module Orm module Base module AssetBase module InstanceMethods def filename data_file_name end def size data_file_size end def has_dimensions? respond_to?(:width) && respond_to?(:height) end def image? Ckeditor::IMAGE_TYPES.include?(data_content_type) end def format_created_at self.created_at.strftime("%d.%m.%Y") end def url_content url end def url_thumb url(:thumb) end def as_json_methods [:url_content, :url_thumb, :size, :filename, :format_created_at] end def as_json(options = nil) options = { :methods => as_json_methods, :root => "asset" }.merge(options || {}) super options end end end end end end
Version data entries
24 entries across 24 versions & 3 rubygems