app/models/alchemy/page/page_scopes.rb in alchemy_cms-7.1.12 vs app/models/alchemy/page/page_scopes.rb in alchemy_cms-7.2.1
- old
+ new
@@ -92,14 +92,14 @@
# All searchable pages
#
scope :searchables, -> { not_restricted.published.contentpages }
- # All pages from +Alchemy::Site.current+
+ # All pages from +Alchemy::Current.site+
#
scope :from_current_site,
-> {
- where(Language.table_name => {site_id: Site.current || Site.default}).joins(:language)
+ where(Language.table_name => {site_id: Current.site}).joins(:language)
}
# All pages for xml sitemap
#
scope :sitemap, -> { from_current_site.published.contentpages.where(sitemap: true) }