我正在尝试将变量传递给部分,以便可以在部分中调用它这就是我渲染部分的方式
= render :partial => "layouts/reveal_delete", :resource => @schedule
这就是我在部分中调用变量的方式,尽管它似乎不起作用
#RevealDelete.reveal-modal
%a.close-reveal-modal ×
%h3= "Delete #{@resource}"
%p Are you sure you want to delete this?
=link_to "Delete #{@resource}", @resource, :method => :delete, :class => "button close-reveal-modal"
%a.button.alert.close-reveal-modal Cancel