Module: Subscribable::RelationAssigner::ClassMethods

Defined in:
lib/subscribable/relation_assigner.rb

Instance Method Summary collapse

Instance Method Details

#subscribableObject



9
10
11
12
# File 'lib/subscribable/relation_assigner.rb', line 9

def subscribable
  has_many :subscribers, class_name: 'Subscribable::SubRelation', as: :subscription
  has_many :subscriptions, class_name: 'Subscribable::SubRelation', as: :subscriber
end

#subscribable?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/subscribable/relation_assigner.rb', line 14

def subscribable?
  true
end