Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do not hide question's news_update after answer/link

  • Loading branch information...
commit 4f9cc3709b2c19919d0e4ff935811243a916b69d 1 parent d94aa54
Alex Bredariol Grilo authored
Showing with 0 additions and 12 deletions.
  1. +0 −5 app/models/answer.rb
  2. +0 −7 app/models/search_result.rb
5 app/models/answer.rb
View
@@ -177,14 +177,9 @@ def create_news_update
NewsUpdate.create(:author => self.user, :entry => self,
:created_at => self.created_at, :action => 'created')
- hide_news_update
end
handle_asynchronously :create_news_update
- def hide_news_update
- self.question.news_update.hide!
- end
-
def unhide_news_update
if self.question.news_update && self.question.answers_count == 1
# if this is the last question, reshow question's news_update
7 app/models/search_result.rb
View
@@ -110,16 +110,9 @@ def create_news_update
:created_at => self.created_at,
:action => 'created')
- hide_news_update
end
handle_asynchronously :create_news_update
- def hide_news_update
- if self.question.news_update
- self.question.news_update.hide!
- end
- end
-
def unhide_news_update
# if this is the last question, reshow question's news_update
self.question.news_update.show! if self.question.answers_count == 1
Please sign in to comment.
Something went wrong with that request. Please try again.