Sha256: e2a6c04cb505fc8f0f69b1dde96d3622b7ff7009536236cad830c4f01876a00e
Contents?: true
Size: 982 Bytes
Versions: 19
Compression:
Stored size: 982 Bytes
Contents
module Ckeditor module Orm module Base module AssetBase module InstanceMethods def filename data_file_name 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
19 entries across 19 versions & 3 rubygems