You are here: Home Solidarrow Ruby on Rails Solidarrow Cheatsheets

* Form Helpers Cheatsheet

Create forms, check boxes, radio buttons, select lists and more using Rails' built-in form helpers.

fields_for

fields_for creates a scope around a specific model object like form_for, but doesn't create the form tags themselves, making fields_for suitable for specifying additional model objects in the same form. See the example.

 

 

> RELATED ARTICLE

* Quickly debugging form helpers

Sometimes you want to quickly see the output of helper methods, and constantly clicking refresh in your browser then viewing the page source can be tiresome. Instead, use the Rails console to check helpers are doing what you want them to. > More