Skip to content

Commit

Permalink
ラジオボタンでコース選択するよう修正
Browse files Browse the repository at this point in the history
  • Loading branch information
udaikue committed Aug 16, 2021
1 parent 541b4cd commit b2ebdce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/views/users/form/_course.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.form-item
= f.label :course_id, class: 'a-form-label is-required'
.a-button.is-md.is-secondary.is-select.is-block
= f.collection_select :course_id, Course.where(open_course: true).order(:created_at), :id, :title, {}
.form-item__radio-buttons
= f.collection_radio_buttons :course_id, Course.where(open_course: true).order(:created_at).select(:id, :title, :description), :id, :title do |b|
= b.radio_button + b.label
.a-form-help
= f.label Course.find(b.value).description
br

0 comments on commit b2ebdce

Please sign in to comment.