Created
July 25, 2012 07:15
-
-
Save mpugach/3174884 to your computer and use it in GitHub Desktop.
Form_for drop down list and date select fields.
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(@person) do |f| %> | |
| <%= f.label :gender %> | |
| <%= f.select :gender, options_for_select([["Male", true], ["Female", false]]) %> | |
| <%-# in this case :gender is boolean -%> | |
| <%= f.label :birthdate, "Birthday" %> | |
| <%= f.date_select :birthdate, :start_year => 1940 %> | |
| <%= f.submit "Submit" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment