We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello, how can I use it with a sumit button?
like <%= f.submit <> 'save this', class: 'btn btn-success' %>
thanks
The text was updated successfully, but these errors were encountered:
Try something like this:
<%= f.submit ''.html_safe + 'save this', class: 'btn btn-success' %>
Sorry, something went wrong.
I'm trying to accomplish this as well, with no success.
I see what marcuscarey is trying to say, but it doesn't work.
submit outputs:
submit
<%= f.submit 'save this', class: 'btn btn-success' %>
<input class="btn btn-success" name="commit" type="submit" value="save this">
As you can see it outputs an input which means the value attribute cannot contain any HTML
value
I recommend using button which outputs:
button
<%= f.button 'save this', class: 'btn btn-success' %>
<button class="btn btn-success" name="button" type="submit">save this</button>
You can pass a block to nest HTML:
<%= f.button class: 'btn btn-success' do %> <i class="fa fa-..."></i> Save This <% end %>
<button class="btn btn-success" name="button" type="submit"> <i class="fa fa-..."></i> save this </button>
No branches or pull requests
hello,
how can I use it with a sumit button?
like <%= f.submit <> 'save this', class: 'btn btn-success' %>
thanks
The text was updated successfully, but these errors were encountered: