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

Version Path
enju_library-0.3.3 app/models/accept.rb
enju_library-0.3.2 app/models/accept.rb
enju_library-0.3.1 app/models/accept.rb
enju_library-0.3.0 app/models/accept.rb
enju_library-0.3.0.rc.1 app/models/accept.rb
enju_library-0.3.0.beta.2 app/models/accept.rb
enju_library-0.2.5 app/models/accept.rb
enju_library-0.2.4 app/models/accept.rb
enju_library-0.2.3 app/models/accept.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/app/models/accept.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/app/models/accept.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/app/models/accept.rb
enju_library-0.2.2 app/models/accept.rb
enju_library-0.2.1 app/models/accept.rb
enju_library-0.2.0 app/models/accept.rb
enju_library-0.2.0.beta.10 app/models/accept.rb
enju_library-0.2.0.beta.9 app/models/accept.rb
enju_library-0.2.0.beta.8 app/models/accept.rb
enju_library-0.2.0.beta.7 app/models/accept.rb
enju_library-0.2.0.beta.6 app/models/accept.rb