Skip to content

Commit

Permalink
Use safe_load method
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Feb 6, 2013
1 parent 98524d1 commit fbf5ceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rails_admin/config/fields/types/serialized.rb
Expand Up @@ -9,11 +9,11 @@ class Serialized < RailsAdmin::Config::Fields::Types::Text
RailsAdmin::Config::Fields::Types::register(self)

register_instance_option :formatted_value do
YAML.dump value
YAML.dump(value)
end

def parse_input(params)
params[name] = (params[name].blank? ? nil : YAML.load(params[name], :safe => true)) if params[name].is_a?(::String)
params[name] = (params[name].blank? ? nil : YAML.safe_load(params[name])) if params[name].is_a?(::String)
end
end
end
Expand Down

0 comments on commit fbf5ceb

Please sign in to comment.