Sha256: dc8e0eb20ddc7754594ce2512573d49fb1935a54198b9b197e1d85e2edd4e7c3

Contents?: true

Size: 544 Bytes

Versions: 13

Compression:

Stored size: 544 Bytes

Contents

require "rubygems"

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, DateTime
  timestamps!

end

class MongoMapperGrid
  include ::Datagrid

  scope do
    MongoMapperEntry
  end

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

  column :name
  column :group_id
  column :disabled

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
datagrid-1.3.9 spec/support/mongo_mapper.rb
datagrid-1.3.7 spec/support/mongo_mapper.rb
datagrid-1.3.6 spec/support/mongo_mapper.rb
datagrid-1.3.5 spec/support/mongo_mapper.rb
datagrid-1.3.4 spec/support/mongo_mapper.rb
datagrid-1.3.3 spec/support/mongo_mapper.rb
datagrid-1.3.2 spec/support/mongo_mapper.rb
datagrid-1.3.1 spec/support/mongo_mapper.rb
datagrid-1.3.0 spec/support/mongo_mapper.rb
datagrid-1.2.3 spec/support/mongo_mapper.rb
datagrid-1.2.2 spec/support/mongo_mapper.rb
datagrid-1.2.1 spec/support/mongo_mapper.rb
datagrid-1.2.0 spec/support/mongo_mapper.rb