Reputation: 81
Hi I have to give following view in my rails code
<div class="col s12 m2">
<button class="btn waves-effect waves-light btn-medium custom_btn_gray right margin_T20" type="submit" name="action">Search
</button>
</div>
So for this I had included following rails view code :
<div class='col s12 m2'>
<%= submit_tag('search', class: 'btn waves-effect waves-light btn-medium custom_btn_gray right margin_T20')%>
</div>
which further gives this type of html:
<div class="col s12 m2">
<i class="btn waves-effect waves-light btn-medium custom_btn_gray right margin_T20 waves-input-wrapper" style=""><input type="submit" class="waves-button-input" value="search" name="commit"></i>
</div>
But I dont want this I want like the above html . Please guide me where am going wrong . Thanks in advance.
Upvotes: 1
Views: 89
Reputation: 626
Then try this using button_tag
<%= button_tag(type: 'submit', class: "btn waves-effect waves-light btn-medium custom_btn_gray right margin_T20") do %> Search
<% end %>
Upvotes: 0
Reputation: 626
Try this :
<div class='col s12 m2'>
<%= submit_tag "Search", :class => "btn waves-effect waves-light btn-medium custom_btn_gray right margin_T20" %>
</div>
Upvotes: 0