Skip to content

Commit

Permalink
Merge pull request #134 from kufu/feature/update_seed
Browse files Browse the repository at this point in the history
スケジュールを2024年版にする
  • Loading branch information
e-ikuta authored Apr 10, 2024
2 parents be58eec + 0a4d1f0 commit f6678e8
Show file tree
Hide file tree
Showing 4 changed files with 851 additions and 844 deletions.
21 changes: 11 additions & 10 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
next # LTのデータが埋まったら対応する
else
event['talks'].each do |track_name, id| schedule = schedules_by_id[id]
track = Track.find_or_create_by!(event: base_event, name: "Track#{track_name}")
track = Track.find_or_create_by!(event: base_event, name: track_name)
schedule.update!(
track: track,
start_at: start_at,
Expand All @@ -81,17 +81,18 @@
when 'break'
next
when 'lt'
event['talks'].each do |track_name, id|
track = Track.find_or_create_by!(event: base_event, name: "Track#{track_name}")
hash[id] = Schedule.find_or_initialize_by(
track: track,
start_at: start_at,
end_at: end_at
)
end
track = Track.find_or_create_by!(event: base_event, name: "Large Hall")
Schedule.find_or_create_by!(
track: track,
start_at: start_at,
end_at: end_at,
title: event['name'],
description: event['name'],
language: 'en & ja'
)
else
event['talks'].each do |track_name, id|
track = Track.find_or_create_by!(event: base_event, name: "Track#{track_name}")
track = Track.find_or_create_by!(event: base_event, name: track_name)
hash[id] = Schedule.find_or_initialize_by(
track: track,
start_at: start_at,
Expand Down
Loading

0 comments on commit f6678e8

Please sign in to comment.