Sha256: 31c80db4e5cf8f4831986b5d83a1e1b8d9f888de7b46ee041c52609f6d971630

Contents?: true

Size: 445 Bytes

Versions: 20

Compression:

Stored size: 445 Bytes

Contents

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

  validates_uniqueness_of :name, :scope => :grid_name, :on => :create,
    :message => 'A query with this name already exists'

  validates_presence_of :name, :message => 'Please submit the name of the custom query'

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

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
wice_grid-3.3.1 lib/wice/wice_grid_serialized_query.rb
wice_grid-3.3.0 lib/wice/wice_grid_serialized_query.rb
wice_grid-3.2.1 lib/wice_grid_serialized_query.rb
wice_grid-3.2.1.pre3 lib/wice_grid_serialized_query.rb
wice_grid-3.2.1.pre2 lib/wice_grid_serialized_query.rb
wice_grid-3.2.1.pre1 lib/wice_grid_serialized_query.rb
wice_grid-3.2.0 lib/wice_grid_serialized_query.rb
wice_grid-3.2.0.pre4 lib/wice_grid_serialized_query.rb
wice_grid-3.2.0.pre3 lib/wice_grid_serialized_query.rb
wice_grid-3.2.0.pre2 lib/wice_grid_serialized_query.rb
wice_grid-3.2.0.pre1 lib/wice_grid_serialized_query.rb
wice_grid-3.0.4 lib/wice_grid_serialized_query.rb
wice_grid-3.0.3 lib/wice_grid_serialized_query.rb
wice_grid-3.0.2 lib/wice_grid_serialized_query.rb
wice_grid-3.0.1 lib/wice_grid_serialized_query.rb
wice_grid-3.0.0 lib/wice_grid_serialized_query.rb
wice_grid-3.0.0.pre4 lib/wice_grid_serialized_query.rb
wice_grid-3.0.0.pre3 lib/wice_grid_serialized_query.rb
wice_grid-3.0.0.pre2 lib/wice_grid_serialized_query.rb
wice_grid-3.0.0.pre1 lib/wice_grid_serialized_query.rb