Follow our convention of declaring private methods.

This commit is contained in:
Guo Xiang Tan 2016-11-24 10:26:39 +08:00
parent f812415c52
commit 857955dd04
1 changed files with 2 additions and 4 deletions

View File

@ -52,6 +52,8 @@ class TopTopic < ActiveRecord::Base
all: 6) all: 6)
end end
private
def self.sort_orders def self.sort_orders
@@sort_orders ||= [:posts, :views, :likes, :op_likes].freeze @@sort_orders ||= [:posts, :views, :likes, :op_likes].freeze
end end
@ -224,10 +226,6 @@ class TopTopic < ActiveRecord::Base
AND tt.#{period}_#{sort}_count <> c.count", AND tt.#{period}_#{sort}_count <> c.count",
from: start_of(period)) from: start_of(period))
end end
private_class_method :sort_orders, :update_counts_and_compute_scores_for, :remove_invisible_topics,
:add_new_visible_topics, :update_posts_count_for, :update_views_count_for, :update_likes_count_for,
:compute_top_score_for, :start_of, :update_top_topics
end end
# == Schema Information # == Schema Information