Sha256: a2414f16d959c6fb829a940d0529785873f91726f88d9a97826080217256eb24

Contents?: true

Size: 684 Bytes

Versions: 17

Compression:

Stored size: 684 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 => Time

end

class MongoidGrid
  include ::Datagrid

  scope do
    MongoidEntry
  end

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

  column :name
  column :group_id
  column :disabled

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
datagrid-1.6.1 spec/support/mongoid.rb
datagrid-1.6.0 spec/support/mongoid.rb
datagrid-1.5.9 spec/support/mongoid.rb
datagrid-1.5.8 spec/support/mongoid.rb
datagrid-1.5.7 spec/support/mongoid.rb
datagrid-1.5.6 spec/support/mongoid.rb
datagrid-1.5.5 spec/support/mongoid.rb
datagrid-1.5.4 spec/support/mongoid.rb
datagrid-1.5.3 spec/support/mongoid.rb
datagrid-1.5.2 spec/support/mongoid.rb
datagrid-1.5.1 spec/support/mongoid.rb
datagrid-1.5.0 spec/support/mongoid.rb
datagrid-1.4.4 spec/support/mongoid.rb
datagrid-1.4.3 spec/support/mongoid.rb
datagrid-1.4.2 spec/support/mongoid.rb
datagrid-1.4.1 spec/support/mongoid.rb
datagrid-1.4.0 spec/support/mongoid.rb