Sha256: 2ec211693ab616aa715c13d90ea2641bd9b1e02f84aa6a90fb8e494699e93b70

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

class GiftCard < ActiveRecordShared

	belongs_to :study_subject
	attr_protected :study_subject_id, :study_subject
	belongs_to :project

	validates_presence_of   :number
	validates_length_of     :number,     :maximum => 250, :allow_blank => true
	validates_uniqueness_of :number
	validates_length_of     :expiration, :maximum => 250, :allow_blank => true
	validates_length_of     :vendor,     :maximum => 250, :allow_blank => true

	def to_s
		number
	end

#	include GiftCardSearch
	def self.search(params={})
		GiftCardSearch.new(params).gift_cards
	end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ccls-ccls_engine-3.11.0 app/models/gift_card.rb