Sha256: 3c128386b1e52d924155bb2712c6b8c54652fb0a4936bf525f0f97fc657d83c4

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 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

1 entries across 1 versions & 1 rubygems

Version Path
ckeditor-4.2.0 lib/ckeditor/orm/active_record.rb