lib/talkie/acts_as_talker.rb in talkie-0.2.0 vs lib/talkie/acts_as_talker.rb in talkie-0.3.0

- old
+ new

@@ -11,9 +11,16 @@ class_eval do has_many :comments, as: :creator, class_name: 'Talkie::Comment', inverse_of: :creator + has_many :subscriptions, as: :subscriber, + class_name: 'Talkie::Subscription', + dependent: :destroy, + inverse_of: :subscriber + + scope :mentionees, Talkie.mentions_scope_query if Talkie.mentions_enabled? + def owns_comment?(comment) self == comment.creator end end end