Sha256: 37762a99064c3ee48217fb971f2c51767252b36a1452139bd3c82c9b15c65bb5

Contents?: true

Size: 372 Bytes

Versions: 9

Compression:

Stored size: 372 Bytes

Contents

module Yodeler
  class Subscription < ActiveRecord::Base
    validates_presence_of :subscriber, :event_type
    belongs_to :event_type, class_name: "Yodeler::EventType::Base", foreign_key: :yodeler_event_type_id
    belongs_to :subscriber, polymorphic: true

    has_many :notifications, class_name: "Yodeler::Notification", foreign_key: :yodeler_subscription_id
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
yodeler-0.0.10 lib/yodeler/models/subscription.rb
yodeler-0.0.9 lib/yodeler/models/subscription.rb
yodeler-0.0.8 lib/yodeler/models/subscription.rb
yodeler-0.0.7 lib/yodeler/models/subscription.rb
yodeler-0.0.6 lib/yodeler/models/subscription.rb
yodeler-0.0.5 lib/yodeler/models/subscription.rb
yodeler-0.0.4 lib/yodeler/models/subscription.rb
yodeler-0.0.3 lib/yodeler/models/subscription.rb
yodeler-0.0.1 lib/yodeler/models/subscription.rb