0
有什么办法来改变提供按钮的图像在下面的代码提供图像button_to在轨道3
<%= button_to 'Edit treatment', edit_treatment_path(@treatment), :type => "submit", :class => "style3", :method => "get" %>
有什么办法来改变提供按钮的图像在下面的代码提供图像button_to在轨道3
<%= button_to 'Edit treatment', edit_treatment_path(@treatment), :type => "submit", :class => "style3", :method => "get" %>
如果您尝试提交通过点击图片形式(假设从你的类型是“提交”),可以使用
image_submit_tag("your_image.png", :class => "style3")
如果你的意思是一个标准的按钮,你可以使用
link_to image_tag("your_image.png"), edit_treatment_path(@treatment), :class => "style3"
谢谢...的答案...这正是我所需要的 – 2012-08-11 22:54:43