-
-
Save gbelote/583537 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% form_for @board do |f| %> # form_for ( symbol or actual object ) do |(var)| | |
| <% f.label :title %>: | |
| <% f.text_field :title %><br /> | |
| <% f.label :price %> | |
| <% f.text_field :price %><br /> | |
| <% f.submit %> | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The form helper created by form_for will pull properties :title and :price from the object passed in (@board). Note that you could also use :board if you don't have an object, but in this case form_for will pre-populate the fields :title and :price with @board.title and @board.price, respectively.