Sha256: 7e0d79f5c2b598a973b5d3f2037d8ae5bebd4682905309916cf2c73f9e22d406

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 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.where(conditions).load
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wice_grid-3.4.0 lib/wice/wice_grid_serialized_query.rb