Sha256: 8e4c068753812db9c662f62df5e443a9d9120e8230d3dde619b4bbe4e4e44f0d

Contents?: true

Size: 328 Bytes

Versions: 2

Compression:

Stored size: 328 Bytes

Contents

module Puffer
  module OrmAdapter
    module Mongoid

      def columns_hash
        klass.fields.inject({}) do |result, (name, object)|
          result.merge name => {:type => object.type.to_s.underscore.to_sym}
        end
      end

    end
  end
end

Mongoid::Document::OrmAdapter.send :include, Puffer::OrmAdapter::Mongoid

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puffer-0.0.29 lib/puffer/orm_adapter/mongoid.rb
puffer-0.0.28 lib/puffer/orm_adapter/mongoid.rb