Sha256: 27656e23dc88463749ee9576fccbf9367c9317bfb32ae5dd4195e6afd85d6c96

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 Bytes

Contents

class Subscribe < ApplicationRecord
  belongs_to :subscription, counter_cache: true, validate: true
  belongs_to :work, class_name: 'Manifestation', validate: true

  validates_associated :subscription, :work
  validates_presence_of :subscription, :work, :start_at, :end_at
  validates_uniqueness_of :work_id, scope: :subscription_id
end

# == Schema Information
#
# Table name: subscribes
#
#  id              :bigint           not null, primary key
#  subscription_id :bigint           not null
#  work_id         :integer          not null
#  start_at        :datetime         not null
#  end_at          :datetime         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_library-0.4.0.rc.1 app/models/subscribe.rb