the template of related pages were not updated for the non default locale

This commit is contained in:
did 2012-03-19 09:15:12 -07:00
parent cfbe68564d
commit e2f60f2e15
1 changed files with 3 additions and 3 deletions

View File

@ -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 }