diff --git a/lib/rails_admin/config/fields/types/serialized.rb b/lib/rails_admin/config/fields/types/serialized.rb index c60efe8346..3cf5599d1a 100644 --- a/lib/rails_admin/config/fields/types/serialized.rb +++ b/lib/rails_admin/config/fields/types/serialized.rb @@ -14,7 +14,7 @@ class Serialized < RailsAdmin::Config::Fields::Types::Text def parse_input(params) return unless params[name].is_a?(::String) - params[name] = (params[name].blank? ? nil : (YAML.safe_load(params[name]) || nil)) + params[name] = (params[name].blank? ? nil : (SafeYAML.load(params[name]) || nil)) end end end diff --git a/lib/rails_admin/engine.rb b/lib/rails_admin/engine.rb index 28f9803320..69cd31a4fc 100644 --- a/lib/rails_admin/engine.rb +++ b/lib/rails_admin/engine.rb @@ -7,10 +7,7 @@ require 'rails' require 'rails_admin' require 'remotipart' -require 'safe_yaml' - -SafeYAML::OPTIONS[:suppress_warnings] = true -SafeYAML::OPTIONS[:default_mode] = :unsafe +require 'safe_yaml/load' module RailsAdmin class Engine < Rails::Engine