lib/spotlight/engine.rb in blacklight-spotlight-4.2.0 vs lib/spotlight/engine.rb in blacklight-spotlight-4.3.0

- old
+ new

@@ -328,25 +328,12 @@ config.assign_default_roles_to_first_user = true config.exhibit_roles = %w[admin curator viewer] # PaperTrail serializes objects to YAML, so we need to permit these classes to be deserialized - if ActiveRecord.respond_to?(:yaml_column_permitted_classes) - # Rails >= 7.0 - ActiveRecord.yaml_column_permitted_classes ||= [] - ActiveRecord.yaml_column_permitted_classes += [Symbol, - ActiveSupport::HashWithIndifferentAccess, - ActiveSupport::TimeWithZone, - ActiveSupport::TimeZone, - Time] - elsif ActiveRecord::Base.respond_to?(:yaml_column_permitted_classes) - # Rails 6.1 - ActiveRecord::Base.yaml_column_permitted_classes ||= [] - ActiveRecord::Base.yaml_column_permitted_classes += [Symbol, - ActiveSupport::HashWithIndifferentAccess, - ActiveSupport::TimeWithZone, - ActiveSupport::TimeZone, - Time] - end + ActiveRecord.yaml_column_permitted_classes += [ActiveSupport::HashWithIndifferentAccess, + ActiveSupport::TimeWithZone, + ActiveSupport::TimeZone, + Time] end # rubocop:enable Metrics/ClassLength end