Sha256: 07db53a491d55aa19098a14471c123230161f0eab9c3e6d9c639233a8ff79c2a
Contents?: true
Size: 682 Bytes
Versions: 25
Compression:
Stored size: 682 Bytes
Contents
require "rubygems" require 'mongo_mapper' MongoMapper.connection = Mongo::Connection.new('localhost', 27017) MongoMapper.database = "datagrid_mongo_mapper" 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
25 entries across 25 versions & 1 rubygems