fix issue with snippet dependencies
This commit is contained in:
parent
eabe4903f3
commit
dd0a09ec4d
@ -32,13 +32,15 @@ class Snippet
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update_templates
|
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 = self.site.pages.any_in(:snippet_dependencies => [self.slug]).to_a
|
||||||
|
|
||||||
pages.each do |page|
|
pages.each do |page|
|
||||||
self._change_snippet_inside_template(page.template.root)
|
self._change_snippet_inside_template(page.template.root)
|
||||||
|
|
||||||
|
page.instance_variable_set(:@template_changed, true)
|
||||||
|
|
||||||
page.send(:_serialize_template) && page.save
|
page.send(:_serialize_template) && page.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
3
doc/TODO
3
doc/TODO
@ -27,9 +27,10 @@ x import tool:
|
|||||||
x disable sub tasks by passing options
|
x disable sub tasks by passing options
|
||||||
x exceptions
|
x exceptions
|
||||||
x page to import theme
|
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)
|
- global regions: keyword in editable element (http://www.mongodb.org/display/DOCS/Updating)
|
||||||
- write my first tutorial about locomotive
|
- write my first tutorial about locomotive
|
||||||
- snippet dependencies => do not work correctly
|
|
||||||
|
|
||||||
- refactor slugify method (use parameterize + create a module)
|
- refactor slugify method (use parameterize + create a module)
|
||||||
- [content types] the "display column" selector should not include file types
|
- [content types] the "display column" selector should not include file types
|
||||||
|
Loading…
Reference in New Issue
Block a user