mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
Subscribe asker to the answer
This commit is contained in:
parent
ecffd07344
commit
1c485b20e9
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@ class Answer < ActiveRecord::Base
|
|||
|
||||
Notification.notify self.question.user, self unless self.question.author_is_anonymous
|
||||
Subscription.subscribe self.user, self
|
||||
Subscription.subscribe self.question.user, self
|
||||
self.user.increment! :answered_count
|
||||
self.question.increment! :answer_count
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue