如何在Rails3中创建带标签和图像的按钮?
此代码仅显示图像:
<%= link_to image_tag("newRevision.png"), {:controller => :review_transitions, :action => :show_step}, {:class => "navBtn"} %>
但......带有文字的图片?
<%= link_to "example_text"+image_tag("newRevision.png"), {:controller => :review_transitions, :action => :show_step}, {:class => "navBtn"} %>
谢谢!
答案 0 :(得分:0)
我认为这可能是这些内容
<%= link_to image_tag('image/someimage.png') + "Some text", some_path) %>