0

如何在 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"} %>

谢谢!

4

1 回答 1

0

我认为可能是这样的

<%= link_to image_tag('image/someimage.png') + "Some text", some_path) %>
于 2013-01-17T15:02:45.823 回答