Sha256: 2cf924a406818a9d234af15fc236803ca0fcf030c6f82f6c2b83db05b1d80fff

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

class Accept < ApplicationRecord
  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           :bigint           not null, primary key
#  basket_id    :bigint
#  item_id      :bigint
#  librarian_id :bigint
#  created_at   :datetime         not null
#  updated_at   :datetime         not null
#

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_library-0.4.0.rc.1 app/models/accept.rb