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:
parent
3c23b5c8ed
commit
ba2b2b7fc9
7 changed files with 621 additions and 560 deletions
|
|
@ -9,6 +9,6 @@
|
|||
# Matching on major and minor versions should be enough for most migrations.
|
||||
module RailsVersion
|
||||
def self.next?
|
||||
Rails::VERSION::MAJOR == 7 && Rails::VERSION::MINOR == 2
|
||||
Rails::VERSION::MAJOR == 8 && Rails::VERSION::MINOR == 0
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue