Nested snippets now update correctly, fixes #84
This commit is contained in:
parent
c07dbb3f98
commit
684b1ddf5c
@ -12,11 +12,14 @@ module Locomotive
|
|||||||
|
|
||||||
@slug = @template_name.gsub('\'', '')
|
@slug = @template_name.gsub('\'', '')
|
||||||
|
|
||||||
|
@context[:snippets] = [] if @context[:snippets].nil?
|
||||||
(@context[:snippets] << @slug).uniq!
|
(@context[:snippets] << @slug).uniq!
|
||||||
|
|
||||||
snippet = @context[:site].snippets.where(:slug => @slug).first
|
if @context[:site].present?
|
||||||
|
snippet = @context[:site].snippets.where(:slug => @slug).first
|
||||||
|
|
||||||
self.refresh(snippet) if snippet
|
self.refresh(snippet) if snippet
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
|
Loading…
Reference in New Issue
Block a user