app/models/alchemy/page/page_scopes.rb in alchemy_cms-4.2.0 vs app/models/alchemy/page/page_scopes.rb in alchemy_cms-4.2.1
- old
+ new
@@ -64,10 +64,10 @@
}
# Returns all content pages.
#
scope :contentpages, -> {
- where(layoutpage: [false, nil]).where.not(parent_id: nil)
+ where(layoutpage: [false, nil]).where(Page.arel_table[:parent_id].not_eq(nil))
}
# Returns all public contentpages that are not locked.
#
# Used for flushing all pages caches at once.