I want to display a label in form_for
:
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
This generates the label "Name", but I want it to be "Your Name". How can I change it?
The second parameter to label
helper will allow you to set custom text.
<%= f.label :name, 'Your Name' %>
Use Ruby on Rails Documentation to look up helper methods.