bugfix
This commit is contained in:
parent
0ebf918d83
commit
ec8e813546
|
@ -7,7 +7,7 @@ class Question < ActiveRecord::Base
|
||||||
def can_be_removed?
|
def can_be_removed?
|
||||||
return false if self.answers.count > 0
|
return false if self.answers.count > 0
|
||||||
return false if Inbox.where(question: self).count > 1
|
return false if Inbox.where(question: self).count > 1
|
||||||
self.user.decrement! :asked_count
|
self.user.decrement! :asked_count unless self.author_is_anonymous
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue