Sha256: 39126cc319f97b2a001f97469b401ee010d6c2ff7b09689f51d1f13cef4696e9
Contents?: true
Size: 944 Bytes
Versions: 32
Compression:
Stored size: 944 Bytes
Contents
class Produce < ActiveRecord::Base attr_accessible :patron_id, :manifestation_id, :produce_type_id, :position belongs_to :patron belongs_to :manifestation belongs_to :produce_type delegate :original_title, :to => :manifestation, :prefix => true validates_associated :patron, :manifestation validates_presence_of :patron, :manifestation validates_uniqueness_of :manifestation_id, :scope => :patron_id after_save :reindex after_destroy :reindex acts_as_list :scope => :manifestation def reindex patron.try(:index) manifestation.try(:index) end end # == Schema Information # # Table name: produces # # id :integer not null, primary key # patron_id :integer not null # manifestation_id :integer not null # position :integer # created_at :datetime not null # updated_at :datetime not null # produce_type_id :integer #
Version data entries
32 entries across 32 versions & 1 rubygems