diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index 4e86e5b8d..9ea672312 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -5,10 +5,10 @@ class BubblesController < ApplicationController if params[:tag_id] @tag = Tag.find(params[:tag_id]) @bubbles = @tag.bubbles - @most_active_bubbles = @tag.bubbles.left_joins(:comments, :boosts).group(:id).order(Arel.sql('COUNT(comments.id) + COUNT(boosts.id) DESC')).limit(10) + @most_active_bubbles = @tag.bubbles.left_joins(:comments, :boosts).group(:id).order(Arel.sql("COUNT(comments.id) + COUNT(boosts.id) DESC")).limit(10) else @bubbles = Bubble.all.order(created_at: :desc) - @most_active_bubbles = Bubble.left_joins(:comments, :boosts).group(:id).order(Arel.sql('COUNT(comments.id) + COUNT(boosts.id) DESC')).limit(10) + @most_active_bubbles = Bubble.left_joins(:comments, :boosts).group(:id).order(Arel.sql("COUNT(comments.id) + COUNT(boosts.id) DESC")).limit(10) end end