ActionView::Helpers::FormBuilder
class ActionView::Helpers::FormBuilder
A FormBuilder
object is associated with a particular model object and allows you to generate fields associated with the model object. The FormBuilder
object is yielded when using form_for
or fields_for
. For example:
<%= form_for @person do |person_form| %> Name: <%= person_form.text_field :name %> Admin: <%= person_form.check_box :admin %> <% end %>
In the above block, a FormBuilder
object is yielded as the person_form
variable. This allows you to gene