ubique
ubique

Reputation: 1212

Rails3 - changing links into graphic button

I would like to change the standard links and buttons in Rails to a graphic version. How would I achieve this?

enter image description here

Upvotes: 0

Views: 71

Answers (2)

polarblau
polarblau

Reputation: 17724

Given how reduced the graphic version is, why not use CSS? No need to change any of the mark–up or template tags. — http://jsfiddle.net/ry5KD/ (super–reduced example!).

Upvotes: 1

Felix
Felix

Reputation: 801

Well, for standard links, you can do something like:

<%= link_to image_tag('/images/link.png'), link_path %>

For submit buttons, you can use the image_submit_tag helper within your form:

<%= form_for ... %>
    <%= image_submit_tag '/images/submit.png' %> 
<% end %> 

Upvotes: 2

Related Questions