Sha256: e636d6794c8d6aa41e272b434f454f9446ca2afa698299d5aaf83ee3683156e0
Contents?: true
Size: 861 Bytes
Versions: 32
Compression:
Stored size: 861 Bytes
Contents
class Create < ActiveRecord::Base attr_accessible :patron_id, :work_id, :create_type_id, :position belongs_to :patron belongs_to :work, :class_name => 'Manifestation', :foreign_key => 'work_id' belongs_to :create_type validates_associated :patron, :work validates_presence_of :patron_id, :work_id validates_uniqueness_of :work_id, :scope => :patron_id after_save :reindex after_destroy :reindex acts_as_list :scope => :work def reindex patron.try(:index) work.try(:index) end end # == Schema Information # # Table name: creates # # id :integer not null, primary key # patron_id :integer not null # work_id :integer not null # position :integer # created_at :datetime not null # updated_at :datetime not null # create_type_id :integer #
Version data entries
32 entries across 32 versions & 1 rubygems