How to edit Bootstrap button CSS in Rails 4

On your _form.html.erb page in views,

look for this code:

<%= f.submit %>

To add a class, enter it like so:

<%= f.submit class: 'btn btn-default' %>

The 'btn btn-default' is Bootstrap’s default button style. Choose what you want your button to look like here:
http://getbootstrap.com/css/#buttons

Source: http://stackoverflow.com/questions/5315967/add-a-css-class-to-f-submit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s