Sha256: b5e50e973528feefdae1937eecab306095baecc888bf1faebefecec2cb76d1d3

Contents?: true

Size: 508 Bytes

Versions: 18

Compression:

Stored size: 508 Bytes

Contents

# encoding: UTF-8
class WiceGridSerializedQuery < ActiveRecord::Base  #:nodoc:
  serialize :query

  validates_uniqueness_of :name, :scope => :grid_name, :on => :create, 
    :message => ::Wice::WiceGridNlMessageProvider.get_message(:VALIDATES_UNIQUENESS_ERROR)
  validates_presence_of :name, :message => ::Wice::WiceGridNlMessageProvider.get_message(:VALIDATES_PRESENCE_ERROR)

  def self.list(name, controller)
    conditions = {:grid_name => name}
    self.find(:all, :conditions => conditions)
  end

end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
wice_grid_mongo-6.2.4 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.2.3 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.2.2 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.2.1 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.2.0 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.1.1 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.1.0 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.10 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.9 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.8 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.7 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.6 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.5 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.4 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-6.0.3 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-0.5.7 lib/wice_grid_serialized_query.rb
wice_grid_mongoid-0.5.6 lib/wice_grid_serialized_query.rb
mongoid_wice_grid-4.0.0 lib/wice_grid_serialized_query.rb