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