the rescue wasn't trying the name, causing private method call exceptions

This commit is contained in:
Dirk Kelly 2011-03-02 10:05:50 +08:00
parent adbae00457
commit 74277b48ed

View File

@ -38,11 +38,11 @@ module Locomotive
current_page = context.registers[:page] current_page = context.registers[:page]
element = current_page.find_editable_element(context['block'].try(:name), @slug) element = current_page.find_editable_element(context['block'].try(:name), @slug)
if element if element.present?
render_element(context, element) render_element(context, element)
else else
Locomotive.logger "[editable element] missing element #{context[:block].name} / #{@slug}" Locomotive.logger "[editable element] missing element `#{context['block'].try(:name)}` / #{@slug} on #{current_page.fullpath}"
'' ''
end end
end end