the template of related pages were not updated for the non default locale
This commit is contained in:
parent
cfbe68564d
commit
e2f60f2e15
@ -77,7 +77,7 @@ module Locomotive
|
|||||||
return unless @template_changed == true
|
return unless @template_changed == true
|
||||||
|
|
||||||
# we admit at this point that the current template is up-to-date
|
# we admit at this point that the current template is up-to-date
|
||||||
template_descendants = self.site.pages.any_in(:template_dependencies => [self.id]).to_a
|
template_descendants = self.site.pages.any_in("template_dependencies.#{::Mongoid::Fields::I18n.locale}" => [self.id]).to_a
|
||||||
|
|
||||||
# group them by fullpath for better performance
|
# group them by fullpath for better performance
|
||||||
cached = template_descendants.inject({}) { |memo, page| memo[page.fullpath] = page; memo }
|
cached = template_descendants.inject({}) { |memo, page| memo[page.fullpath] = page; memo }
|
||||||
|
Loading…
Reference in New Issue
Block a user