Sha256: 4fab9d9c566489ff39200792751d6b9de8a8661245c8008e675da884740647bf
Contents?: true
Size: 1.01 KB
Versions: 35
Compression:
Stored size: 1.01 KB
Contents
require 'orm_adapter/adapters/mongoid' require 'ckeditor/orm/base' module Ckeditor module Orm module Mongoid module AssetBase def self.included(base) base.send(:include, ::Mongoid::Document) base.send(:include, ::Mongoid::Timestamps) base.send(:include, Base::AssetBase::InstanceMethods) base.send(:include, InstanceMethods) base.send(:extend, ClassMethods) end module InstanceMethods def type _type end def as_json_methods [:id, :type] + super end end module ClassMethods def self.extended(base) base.class_eval do field :data_content_type, :type => String field :data_file_size, :type => Integer field :width, :type => Integer field :height, :type => Integer belongs_to :assetable, :polymorphic => true end end end end end end end
Version data entries
35 entries across 35 versions & 4 rubygems