Ruby On Rails submit with image button

10.44 Muhamad Akbar Bin Widayat 0 Comments

Hi all,

I will share you about adding image on rails. Please follow me.
1. code html:
  
product search search

2. code rails:
  <%= form_tag fast_tracks_path, :method => 'get' do %>
    product search <%= image_submit_tag("/assets/icon-search.png") %>
    <%= text_field_tag 'variant[name]' %>
  <% end %>

Please using image_submit_tag I hope this article is usefully.

0 komentar:

terimakasih komentarnya