aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/subscription.rb
blob: f87315fcd19f5f2b08c6021c6e2e6b0ef310ba7c (plain) (blame)
1
2
3
4
5
6
7
8
# frozen_string_literal: true

class Subscription < ActiveRecord::Base
  belongs_to :subscriber, counter_cache: :books_count
  belongs_to :book

  validates_presence_of :subscriber_id, :book_id
end