Sha256: 1e0d67dd5ba32e4533aa0fd17cd7f5f4da888130c61aabc1b59fcaa549b9babc
Contents?: true
Size: 842 Bytes
Versions: 23
Compression:
Stored size: 842 Bytes
Contents
require "rubygems" require 'mongoid' Mongoid.from_hash({ "host" => "localhost", "database" =>"datagrid_mongoid", "autocreate_indexes" => true, "logger" => nil, }) #Mongoid.logger = TEST_LOGGER #TODO: understand why still output to STDOUT 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
23 entries across 23 versions & 1 rubygems