app/views/questionnaires/_form.html.haml in hackathon_manager-0.6.5 vs app/views/questionnaires/_form.html.haml in hackathon_manager-0.6.6

- old
+ new

@@ -14,12 +14,12 @@ = f.input :last_name, input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } = f.input :phone, label: "Phone number", input_html: { "data-validate" => "presence" } = f.input :date_of_birth, start_year: Date.today.year - 5, end_year: Date.today.year - 90, order: [:month, :day, :year], input_html: { "data-validate" => "presence" } = f.input :school_id, as: :school_selection, input_html: { "data-validate" => "presence" } - = f.input :level_of_study, input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } + = f.input :level_of_study, collection: collection_or_text(@questionnaire.level_of_study, Questionnaire::POSSIBLE_LEVELS_OF_STUDY), include_blank: "(select one...)", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } = f.input :major, input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } - = f.input :gender, input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } + = f.input :gender, collection: collection_or_text(@questionnaire.gender, Questionnaire::POSSIBLE_GENDERS), include_blank: "(select one...)", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } = f.input :shirt_size, as: :select, collection: Questionnaire::POSSIBLE_SHIRT_SIZES, include_blank: "(select one...)", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' } = f.input :dietary_restrictions, as: :text, placeholder: "Allergies, medical assistance, etc.", label: "Health restrictions", wrapper_html: { class: 'input--half' } = f.input :special_needs, as: :text, placeholder: "Any special needs or requests", label: "Special needs", wrapper_html: { class: 'input--half' } .right