0

How to create a button with label and image in Rails3?

This code only show an image:

<%= link_to image_tag("newRevision.png"), {:controller => :review_transitions, :action => :show_step}, {:class => "navBtn"} %>

but... the image with text?

<%= link_to "example_text"+image_tag("newRevision.png"), {:controller => :review_transitions, :action => :show_step}, {:class => "navBtn"} %>

thanks!

user1364684
  • 800
  • 2
  • 8
  • 28

1 Answers1

0

I think it may be something along these lines

<%= link_to image_tag('image/someimage.png') + "Some text", some_path) %>
Richlewis
  • 15,070
  • 37
  • 122
  • 283
  • thanks Richlewis for your answer... but I want the image behind the text... "Some text" + image_tag... is posible?¿ – user1364684 Jan 17 '13 at 15:37