-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
「プログラミング経験」を複数選択可能なチェックボックス形式へ変更 #7970
Merged
komagata
merged 15 commits into
main
from
feature/change_to_checkbox_and_add_experiences
Aug 21, 2024
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a18ade9
Userモデルにexperiencesカラムを追加するマイグレーションファイルを作成
motohiro-mm 9253a27
チェックボックスで複数選択し保存できるよう修正
motohiro-mm 1a52d58
ユーザー非公開情報の「経験」部分をexperiencesに対応するよう修正
motohiro-mm 0409367
データマイグレーションファイルを作成
motohiro-mm 6b9c4c4
未経験用のコメントを追加、クラス名の修正
motohiro-mm cfd3a3e
ファイル名を_experiences.html.slimに変更、formの対応部分も修正
motohiro-mm 242f9d2
usersコントローラのparamsにexperiencesを追加、不要なexperienceを削除
motohiro-mm 132b126
experienceのvalidateを削除
motohiro-mm 1db2da0
fixturesのexperienceをexperiencesに修正
motohiro-mm 1535da3
システムテスト追加、既存のテストの修正
motohiro-mm 8881a26
プログラミング経験のデザインとフォーム内の文章のブラッシュアップ
machida 0a17088
選択肢の枠内全部がクリックできるよう修正
motohiro-mm 736ea2f
other_languagesに変更
motohiro-mm dfda897
api/users/list_userの使われていないexperienceを削除
motohiro-mm e6603ab
other_languagesをlanguages_other_than_ruby_and_javascriptに変更
motohiro-mm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.form-item | ||
= f.label :experiences, 'プログラミング経験(複数選択可)', class: 'a-form-label' | ||
|
||
.a-form-help | ||
p | ||
| プログラミング経験の有無について、以下のいずれかに該当する場合は該当する | ||
| 項目にチェックを入れてください。多くの方はどの項目にも該当しない「未経験」であるため、 | ||
| 心配なさらずにご回答ください。 | ||
| この情報は他のフィヨルドブートキャンプの参加者に公開されることはありません。 | ||
|
||
ul.block-checks.is-2-items.mt-4 | ||
= f.collection_check_boxes :experiences, User.experiences.pairs, :second, :first, class: 'label-checkbox' do |b| | ||
li.block-checks__item | ||
.a-block-check.is-checkbox | ||
= b.check_box(class: 'a-toggle-checkbox') | ||
= b.label(class: 'a-block-check__label is-ta-left') | ||
= b.text |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
.form-item | ||
= f.label :job_seeker, class: 'a-form-label' | ||
= f.label :job_seeker, class: 'a-form-label' do | ||
| #{User.human_attribute_name :job_seeker}(任意) | ||
ul.block-checks.is-1-item | ||
li.block-checks__item | ||
.a-block-check.is-checkbox | ||
= f.check_box :job_seeker, class: 'a-toggle-checkbox' | ||
= f.label :job_seeker, class: 'a-block-check__label is-ta-left' do | ||
= User.human_attribute_name :job_seeker | ||
| 就職サポートを希望する | ||
.a-form-help | ||
p | ||
| 就職を希望する場合は、就職相談や就職先企業の紹介を行います(フィヨルドブートキャンプが紹介する企業に就職することが必須ではありません)。状況に合わせていつでも変更できます。この情報は他のフィヨルドブートキャンプ参加者には公開されません。 | ||
| 就職サポートを希望する場合、就職相談、提出書類のレビュー、 | ||
| 面接対策、企業の紹介など、就職に関する広範なサポートを提供します。 | ||
| 状況に応じて、サポートの内容をいつでも変更することが可能です。 | ||
| この情報は他のフィヨルドブートキャンプ参加者には公開されません。 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ ja: | |
os: 利用OS | ||
study_place: 主な学習場所 | ||
experience: プログラミング経験 | ||
experiences: プログラミング経験 | ||
editor: 使用しているエディタ | ||
organization: 現在の所属組織 | ||
company: 企業 | ||
|
@@ -93,7 +94,7 @@ ja: | |
satisfaction: 満足度 | ||
opinion: ご意見 | ||
mail_notification: メール通知 | ||
job_seeker: 就職を希望する | ||
job_seeker: 就職サポート | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらの修正はデザイン修正時にmachidaさんに修正していただいた部分で、今回のissueには直接関係のない部分です。 |
||
github_collaborator: GitHubチーム | ||
tag_list: タグ | ||
training_ends_on: 研修終了日 | ||
|
@@ -422,6 +423,14 @@ ja: | |
cost: 受講料が高いから | ||
job_change: 転職や引っ越しなど環境の変化によって学びが継続できなくなったから | ||
training_end: 企業研修で利用をしていて研修期間が終了したため | ||
experiences: | ||
inexperienced: 未経験 | ||
html_css: HTML/CSSの経験あり | ||
ruby: Rubyの経験あり | ||
rails: Railsの経験あり | ||
javascript: JavaScriptの経験あり | ||
react: Reactの経験あり | ||
languages_other_than_ruby_and_javascript: Ruby、JS以外の言語経験あり | ||
notification: | ||
announcement: お知らせ | ||
mention: メンション | ||
|
23 changes: 23 additions & 0 deletions
23
db/data/20240718110343_copy_experience_to_experiences_for_user.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
class CopyExperienceToExperiencesForUser < ActiveRecord::Migration[6.1] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
def up | ||
User.find_each do |user| | ||
case user.experience | ||
when 'rails' | ||
user.experiences.set(:rails) | ||
when 'ruby' | ||
user.experiences.set(:ruby) | ||
when 'other_ruby' | ||
user.experiences.set(:languages_other_than_ruby_and_javascript) | ||
when 'html_css' | ||
user.experiences.set(:html_css) | ||
end | ||
user.save!(validate: false) | ||
end | ||
end | ||
|
||
def down | ||
raise ActiveRecord::IrreversibleMigration | ||
end | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apiで既存の
experience
カラムは使用されていませんでしたので、experiences
カラムに修正せず削除するようにしました。dfda897
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@motohiro-mm
ありがとうございます!