Use these documents to help you with the review exercises:
FormTagHelper vs. FormHelper Methods
ActiveRecord Queries
<%= form_tag 'confirmation' do %>or
<%= form_tag deposit_confirmation_path do %>
<%= text_field_tag :ssn, 'Enter SSN', class: 'ctrl' %>
<%= submit_tag 'Submit Data', class: 'ctrl' %>
|
|
enrollments | ||
---|---|---|
id | course_id | student_id |
1 | 3 | 1 |
2 | 2 | 2 |
3 | 1 | 3 |
4 | 4 | 2 |
5 | 1 | 3 |
<%= select_tag(:course, options_from_collection_for_select( @student.unenrolled_courses, :id, :course_num)) %>with this code that creates radio buttons:
<% @student.unenrolled_courses.each do |course| %> <%= radio_button_tag(:course, course.id, checked: false) %> <%= course.course_num %><br> <% end %>