Skip to content

Commit

Permalink
Address deprecation warnings for serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
werebus committed Dec 11, 2024
1 parent fba2728 commit bf2cde0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/application_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ApplicationSubmission < ApplicationRecord

attr_accessor :mail_note_for_later, :notify_of_denial

serialize :data, Array
serialize :data, type: Array

# validate ethnicity and gender in constants but allow blank
validates :data, presence: true
Expand Down
2 changes: 1 addition & 1 deletion app/models/unavailability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Unavailability < ApplicationRecord

# this will serialize the columns of the unavailability model
# so that they accept strings in the form of arrays
Date::DAYNAMES.map(&:downcase).map(&:to_sym).each { |d| serialize d, Array }
Date::DAYNAMES.map(&:downcase).map(&:to_sym).each { |d| serialize d, type: Array }

# the grid method returns a data structure
# which represents the unavailability as a 2d array
Expand Down

0 comments on commit bf2cde0

Please sign in to comment.