Skip to content

Commit fbf5ceb

Browse files
committed
Use safe_load method
1 parent 98524d1 commit fbf5ceb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rails_admin/config/fields/types/serialized.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ class Serialized < RailsAdmin::Config::Fields::Types::Text
99
RailsAdmin::Config::Fields::Types::register(self)
1010

1111
register_instance_option :formatted_value do
12-
YAML.dump value
12+
YAML.dump(value)
1313
end
1414

1515
def parse_input(params)
16-
params[name] = (params[name].blank? ? nil : YAML.load(params[name], :safe => true)) if params[name].is_a?(::String)
16+
params[name] = (params[name].blank? ? nil : YAML.safe_load(params[name])) if params[name].is_a?(::String)
1717
end
1818
end
1919
end

0 commit comments

Comments
 (0)