Fixed exception when updating a layout from back-office which contained an editable area

This commit is contained in:
Dirk Kelly 2011-01-14 15:27:58 +08:00
parent 135f6e54ad
commit 62568bbdbb

View File

@ -19,14 +19,18 @@ module Locomotive
end end
def end_tag def end_tag
@context[:page].add_or_update_editable_element({ super
:block => @context[:current_block].try(:name),
:slug => @slug, if @context[:page].present?
:hint => @options[:hint], @context[:page].add_or_update_editable_element({
:default_content => @nodelist.first.to_s, :block => @context[:current_block].try(:name),
:disabled => false, :slug => @slug,
:from_parent => false :hint => @options[:hint],
}, document_type) :default_content => @nodelist.first.to_s,
:disabled => false,
:from_parent => false
}, document_type)
end
end end
def render(context) def render(context)