- content_for :logo, render('logo', :obj => @sites_page)
raise
在 _logo.html.haml
-raise local_variables.inspect
= link_to popup_information_path(obj.class.short_name, obj), :remote => true do
- image_tag(obj.user.avatar.url)
表明局部变量 obj 确实存在
[:local_assigns, :output_buffer, :_old_virtual_path, :_old_output_buffer,
:logo, :obj, :_hamlout, :_erbout, :__in_erb_template, :name, :url,
:path, :haml_temp]
但没有raise
它的抱怨:
undefined local variable or method `obj' for #<#<Class:0xadcdb88>:0x9cc9fd0>
Extracted source (around line #1):
1: = link_to popup_information_path(obj.class.short_name, obj), :remote => true do
2: - image_tag(obj.user.avatar.url)