mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 15:19:08 +01:00
Users get notified by anonymous questions they asked. Fixes Retrospring/bugs#21
This commit is contained in:
parent
c8747fea44
commit
cc16afe49b
1 changed files with 2 additions and 2 deletions
|
@ -8,9 +8,9 @@ class Answer < ActiveRecord::Base
|
|||
after_create do
|
||||
Inbox.where(user: self.user, question: self.question).destroy_all
|
||||
|
||||
Notification.notify self.question.user, self unless self.question.author_is_anonymous
|
||||
Notification.notify self.question.user, self unless self.question.user == self.user or self.question.user.nil?
|
||||
Subscription.subscribe self.user, self
|
||||
Subscription.subscribe self.question.user, self unless self.question.user.nil?
|
||||
Subscription.subscribe self.question.user, self unless self.question.author_is_anonymous
|
||||
self.user.increment! :answered_count
|
||||
self.question.increment! :answer_count
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue