Sha256: ce3970daa16e67ff05d876cec153098920e2a5e7ea1cd288d36d4b5c9b407964
Contents?: true
Size: 383 Bytes
Versions: 10
Compression:
Stored size: 383 Bytes
Contents
# frozen_string_literal: true module Talkie class Subscription < ActiveRecord::Base belongs_to :subscriber, polymorphic: true, inverse_of: :subscriptions belongs_to :comment, inverse_of: :subscriptions, class_name: "Talkie::Comment" validates_presence_of :subscriber, :comment validates_uniqueness_of :comment, scope: [:subscriber_type, :subscriber_id] end end
Version data entries
10 entries across 10 versions & 1 rubygems