Sha256: bb48278b658bc75b05f56ab6758393de55bb52ba8a004a32a387a02cb6283cc6

Contents?: true

Size: 593 Bytes

Versions: 10

Compression:

Stored size: 593 Bytes

Contents

if defined?(MongoMapper)

  class MongoMapperEntry
    include MongoMapper::Document

    key :group_id, Integer
    key :name, String
    key :category, String
    key :disabled, Boolean, :default => false
    key :confirmed, Boolean, :default => false
    key :shipping_date, Time
    timestamps!

  end

  class MongoMapperGrid
    include ::Datagrid

    scope do
      MongoMapperEntry
    end

    filter :name
    integer_range_filters(:group_id, {:default => 0}, {:default => 100})
    filter :disabled, :xboolean

    column :name
    column :group_id
    column :disabled

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
datagrid-1.6.1 spec/support/mongo_mapper.rb
datagrid-1.6.0 spec/support/mongo_mapper.rb
datagrid-1.5.9 spec/support/mongo_mapper.rb
datagrid-1.5.8 spec/support/mongo_mapper.rb
datagrid-1.5.7 spec/support/mongo_mapper.rb
datagrid-1.5.6 spec/support/mongo_mapper.rb
datagrid-1.5.5 spec/support/mongo_mapper.rb
datagrid-1.5.4 spec/support/mongo_mapper.rb
datagrid-1.5.3 spec/support/mongo_mapper.rb
datagrid-1.5.2 spec/support/mongo_mapper.rb