Reputation: 21513
With link_to
, we can embed content like this:
<%= link_to '#' do &>
<img>
By doing so, we could change a text link into other.
However, When using forms, the button is achieve in html using <input>
, and I'm unable to replace it like link_to
. How can I do something like:
<%= f.submit "#" do %>
<img>
Upvotes: 0
Views: 294
Reputation: 863
<%= image_submit_tag("/images/submit.png") %>
or HTML
<input alt="Submit" src="/images/submit.png" type="image" />
Upvotes: 2