Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the coder when using serialize #3005

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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