Sha256: e22178a3c5be893ef92424e17b45771752712a7fe4d36dae9e87c8562dea63a6

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

class ItemHasUseRestriction < ApplicationRecord
  belongs_to :item, validate: true
  belongs_to :use_restriction, validate: true
  accepts_nested_attributes_for :use_restriction

  validates_associated :item, :use_restriction
  validates :use_restriction, presence: true
  validates :item, presence: { on: :update }

  paginates_per 10
end

# == Schema Information
#
# Table name: item_has_use_restrictions
#
#  id                 :bigint           not null, primary key
#  item_id            :bigint           not null
#  use_restriction_id :bigint           not null
#  created_at         :datetime         not null
#  updated_at         :datetime         not null
#

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_circulation-0.4.0.rc.1 app/models/item_has_use_restriction.rb