I want to have the “Save” in bold but not “changes” in the below helper tag.
<%= submit_tag "Save changes", :action => "update", :id => @user %>
I am unable to put HTML in the string and call html_safe on it, eg “Save Changes”.html_safe.
How should I go about this?
The string
"Save changes"gets assigned to thevalueattribute of thesubmittag created by thesubmit_taghelper method. You can’t put additional html within an html tag, which is what you’re trying to do here. If you really want just the first word bolded, then you could consider creating a custom button using HTML and CSS and have it use Javascript to submit the form. Though you may need to fallback to using a normal submit button if your users don’t have Javascript enabled.