fix issue with snippet dependencies

This commit is contained in:
dinedine 2010-10-04 11:16:35 +02:00
parent eabe4903f3
commit dd0a09ec4d
3 changed files with 7 additions and 4 deletions

View File

@ -32,13 +32,15 @@ class Snippet
end
def update_templates
return unless (self.site rescue nil) # not run if the site is being destroyed
return unless (self.site rescue false) # not run if the site is being destroyed
pages = self.site.pages.any_in(:snippet_dependencies => [self.slug]).to_a
pages.each do |page|
self._change_snippet_inside_template(page.template.root)
page.instance_variable_set(:@template_changed, true)
page.send(:_serialize_template) && page.save
end
end

View File

@ -27,9 +27,10 @@ x import tool:
x disable sub tasks by passing options
x exceptions
x page to import theme
x snippet dependencies => do not work correctly
- global regions: keyword in editable element (http://www.mongodb.org/display/DOCS/Updating)
- write my first tutorial about locomotive
- snippet dependencies => do not work correctly
- refactor slugify method (use parameterize + create a module)
- [content types] the "display column" selector should not include file types