Skip to content

Commit

Permalink
Fix: Psych::DisallowedClass
Browse files Browse the repository at this point in the history
  • Loading branch information
khiav223577 committed Sep 2, 2023
1 parent 0f58dda commit 5ca3a4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/lib/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
require 'rails_compatibility/setup_autoload_paths'
RailsCompatibility.setup_autoload_paths [File.expand_path('../models/', __FILE__)]

ActiveRecord::Base.use_yaml_unsafe_load = true if ActiveRecord::Base.method_defined?(:use_yaml_unsafe_load) # For Rails 5.2
ActiveRecord.use_yaml_unsafe_load = true if ActiveRecord.respond_to?(:use_yaml_unsafe_load) # For Rails 7.0

users = User.create([
{ name: 'John', email: '[email protected]' },
{ name: 'Pearl', email: '[email protected]', serialized_attribute: { testing: true, deep: { deep: :deep }}},
Expand Down

0 comments on commit 5ca3a4a

Please sign in to comment.