We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8ff087 commit 1eb1650Copy full SHA for 1eb1650
1 file changed
app/models/tag.rb
@@ -19,10 +19,8 @@ class Tag < ActiveRecord::Base
19
20
scope :visible, -> { where(public: true) }
21
scope :footer, -> {
22
- select([:name]).joins(:taggings).
23
- where(public: true).
24
- joins(:nodes).
25
- where("nodes.public = 1").
+ select([:name]).visible.
+ joins(:nodes).merge(Node.visible).
26
where("taggings.created_at > ?", 1.month.ago).
27
group("taggings.tag_id").
28
order(Arel.sql("COUNT(*) DESC")).
0 commit comments