Skip to content

Commit

Permalink
Set the coder when using serialize (#3005)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne authored Jan 17, 2024
1 parent 4272789 commit 00789a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/spotlight/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Event < ActiveRecord::Base
belongs_to :resource, polymorphic: true
belongs_to :exhibit, optional: true

serialize :data
serialize :data, coder: YAML

self.inheritance_column = :event_class
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/spotlight/job_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JobTracker < ActiveRecord::Base
has_many :job_trackers, as: :on, dependent: Rails.version > '6.1' ? :destroy_async : :destroy
has_many :subevents, through: :job_trackers, source: :events

serialize :data
serialize :data, coder: YAML

after_initialize do
self.data ||= {}
Expand Down

0 comments on commit 00789a2

Please sign in to comment.