--- title: Rails form helpers layout: default --- ### Forms # Model: form_for @post do |f| form_for @post, url: { method: 'put', action: 'create' }, html: { class: 'nifty_form' } do |f| f.label :first_name f.text_field :first_name field :multiselect, f, :first_name ### Stuff f.object ### Fields for = form_for @post do |f| = fields_for :author, @post.author do |ff| = ff.text_field :name ### Fields f.check_box :is_admin f.text_field :title f.text_area :body, size: '60x12' f.label :post, :title f.label :post, :title, "Title" f.label :post, :title, "Title", class: "title" f.label(:post, :terms) { "Accept terms" } #=>