Sha256: 19f229c81018d4e281724c8eb363dc8c74eaec3eaee8688d655be394097daf7e

Contents?: true

Size: 695 Bytes

Versions: 14

Compression:

Stored size: 695 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              :integer          not null, primary key
#  subscription_id :integer          not null
#  work_id         :integer          not null
#  start_at        :datetime         not null
#  end_at          :datetime         not null
#  created_at      :datetime
#  updated_at      :datetime
#

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
enju_library-0.3.11 app/models/subscribe.rb
enju_library-0.3.10 app/models/subscribe.rb
enju_library-0.3.9 app/models/subscribe.rb
enju_library-0.3.8 app/models/subscribe.rb
enju_library-0.3.8.rc.2 app/models/subscribe.rb
enju_library-0.3.8.rc.1 app/models/subscribe.rb
enju_library-0.3.7 app/models/subscribe.rb
enju_library-0.3.6 app/models/subscribe.rb
enju_library-0.4.0.beta.4 app/models/subscribe.rb
enju_library-0.4.0.beta.3 app/models/subscribe.rb
enju_library-0.4.0.beta.2 app/models/subscribe.rb
enju_library-0.4.0.beta.1 app/models/subscribe.rb
enju_library-0.3.5 app/models/subscribe.rb
enju_library-0.3.4 app/models/subscribe.rb