daveasdf
daveasdf

Reputation: 81

Rails simple form button text

I have tried these formats and others. What format is needed to change the text on the simple form button? Thanks!

<%= f.button :submit, :label => 'Assign', class: "btn btn-default btn-primary" %>

<%= f.button :submit, 'Assign', class: "btn btn-default btn-primary" %>

<%= f.button :submit, input_html: { :label => 'Assign' etc } %>

Upvotes: 1

Views: 2175

Answers (1)

Amit Patel
Amit Patel

Reputation: 15985

I assume you want to display label for submit button. Following would give you what you want

<%= f.submit 'Assign', class: "btn btn-default btn-primary" %>

Upvotes: 1

Related Questions