我正在编写我的自定义 FormBuilder,但我不明白为什么下面方法的输出
def submit(label = "Save changes", *args)
options = args.extract_options!
new_class = options[:class] || "btn btn-small btn-success"
@template.content_tag(:div, :class => "form-actions left") do
@template.content_tag(:button, :class => new_class, :name => 'commit', :type => 'submit', :value => label) do
@template.content_tag(:i, :class => 'icon-arrow-right icon-on-right')
end
end
end
是:
<div class="form-actions left">
<button class="btn btn-small btn-success" name="commit" type="submit" value="Salvar">
<i>{:class=>"icon-arrow-right icon-on-right"}
</i>
</button>
</div>
尤其是“i”标签。我该如何解决?谢谢。