Sha256: 8ed39d7466efa1a6da81a2239dc51cf0062cca228371c1dc5a7c7cc3957501b4

Contents?: true

Size: 688 Bytes

Versions: 13

Compression:

Stored size: 688 Bytes

Contents

require "rubygems"

#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

13 entries across 13 versions & 1 rubygems

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