Update Rails to 7.2 and next Rails to 8.0

Only needed some changes to the serializing in Conference.
This commit is contained in:
Henne Vogelsang 2025-08-12 14:05:46 +02:00
parent 3c23b5c8ed
commit ba2b2b7fc9
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
7 changed files with 621 additions and 560 deletions

View file

@ -4,7 +4,9 @@ class Conference < ApplicationRecord
include RevisionCount
require 'uri'
serialize :events_per_week, Hash
serialize :events_per_week, type: Hash
# Needed to call 'Conference.with_role' in /models/ability.rb
# Dependent destroy will fail as roles#destroy will be cancelled,hence delete_all
resourcify :roles, dependent: :delete_all
@ -826,7 +828,7 @@ class Conference < ApplicationRecord
unless result[state.to_s.capitalize]
result[state.to_s.capitalize] = {}
end
result[state.to_s.capitalize][week.strftime('%W').to_i] = value
result[state.to_s.capitalize][DateTime.parse(week).strftime('%W').to_i] = value
end
end
end