Sha256: cf40a6fbaed2915f44332c6937d52629037d11a9b5262a9ade07c15e288a7aa4
Contents?: true
Size: 459 Bytes
Versions: 9
Compression:
Stored size: 459 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' # returns a list of all serialized queries def self.list(name, _controller) conditions = { grid_name: name } self.where(conditions).to_a end end
Version data entries
9 entries across 9 versions & 2 rubygems