We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5870e9c + 8f8d927 commit d77f164Copy full SHA for d77f164
app/models/comment.rb
@@ -31,7 +31,7 @@ class Comment < ActiveRecord::Base
31
scope :under, ->(path) { where("materialized_path LIKE ?", "#{path}_%") }
32
scope :published, -> { where(state: 'published') }
33
scope :on_dashboard, -> { published.order(created_at: :desc) }
34
- scope :footer, -> { published.order(created_at: :desc).limit(12).select([:id, :node_id, :title]) }
+ scope :footer, -> { published.joins(:node).merge(Node.visible).order(created_at: :desc).limit(12).select([:id, :node_id, :title]) }
35
36
validates :title, presence: { message: "Le titre est obligatoire" },
37
length: { maximum: 100, message: "Le titre est trop long" }
0 commit comments