Sha256: 8904e8dc63def782b7ca009c2c8a787d648c2b47ecb99771c6e02316f3c4218c
Contents?: true
Size: 666 Bytes
Versions: 25
Compression:
Stored size: 666 Bytes
Contents
class Accept < ActiveRecord::Base default_scope { order('accepts.id DESC') } belongs_to :basket belongs_to :item, touch: true belongs_to :librarian, class_name: 'User' validates_uniqueness_of :item_id #, message: I18n.t('accept.already_accepted') validates_presence_of :item_id #, message: I18n.t('accept.item_not_found') validates_presence_of :basket_id attr_accessor :item_identifier paginates_per 10 end # == Schema Information # # Table name: accepts # # id :integer not null, primary key # basket_id :integer # item_id :integer # librarian_id :integer # created_at :datetime # updated_at :datetime #
Version data entries
25 entries across 23 versions & 2 rubygems