Sha256: 21d06716af135277b8af3755925f864987d03cce1022d65bdf15a5a192675d5a

Contents?: true

Size: 646 Bytes

Versions: 19

Compression:

Stored size: 646 Bytes

Contents

require 'ckeditor/orm/base'

module Ckeditor
  module Orm
    module ActiveRecord
      module AssetBase
        def self.included(base)
          base.send(:include, Base::AssetBase::InstanceMethods)
          base.send(:extend, ClassMethods)
        end
        
        module ClassMethods
          def self.extended(base)
            base.class_eval do
              self.table_name = "ckeditor_assets"
              
              belongs_to :assetable, :polymorphic => true
              
              attr_accessible :data, :assetable_type, :assetable_id, :assetable
            end
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
glebtv-ckeditor-4.0.2.7 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.2.6 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.2.5 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.2.4 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.2.2 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.2.1 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.2 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.0.1 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.0 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.0.rc2 lib/ckeditor/orm/active_record.rb
lafeber_ckeditor-3.7.3 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.0.rc1 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.3 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.2 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.1 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.0 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.0.rc3 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.0.rc2 lib/ckeditor/orm/active_record.rb
ckeditor-3.7.0.rc1 lib/ckeditor/orm/active_record.rb