Sha256: 118401ab0c29aab75d656dcd7066cab9590e68087fddffc1e1ce64b444dbb86a
Contents?: true
Size: 844 Bytes
Versions: 4
Compression:
Stored size: 844 Bytes
Contents
require "rubygems" require 'mongoid' Mongoid.from_hash({ "host" => "localhost", "database" =>"datagrid_mongoid", "autocreate_indexes" => true, }) #Mongoid.logger = TEST_LOGGER #TODO: understand why still output to STDOUT Mongoid.logger = nil class MongoidEntry include Mongoid::Document include Mongoid::Timestamps field :group_id, :type => Integer field :name, :type => String field :category, :type => String field :disabled, :default => false, :type => Boolean field :confirmed, :default => false, :type => Boolean field :shipping_date, :type => DateTime end class MongoidGrid include ::Datagrid scope do MongoidEntry 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
datagrid-0.5.4 | spec/support/mongoid.rb |
datagrid-0.5.3 | spec/support/mongoid.rb |
datagrid-0.5.2 | spec/support/mongoid.rb |
datagrid-0.5.1 | spec/support/mongoid.rb |