Sha256: 95f0604d6f365bd83577ac8342a28570b550981e47ab23afe75fa6014fd67dd3

Contents?: true

Size: 565 Bytes

Versions: 22

Compression:

Stored size: 565 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              
            end
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
ckeditor-4.0.9 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.8 lib/ckeditor/orm/active_record.rb
base2_ckeditor-4.0.7 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.7 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.2.1.5 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.2.1.4 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.2.1.3 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.2.1.2 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.2.1.1 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.2.1 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.7 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.6 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.6 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.5 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.4 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.3 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.2 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1.1 lib/ckeditor/orm/active_record.rb
glebtv-ckeditor-4.1.1 lib/ckeditor/orm/active_record.rb
ckeditor-4.0.4 lib/ckeditor/orm/active_record.rb