Document and test YAML.safe_load

This commit is contained in:
Nick Rolfe
2021-09-08 18:22:31 +01:00
parent 760dbd739d
commit 2ddca2c0db
3 changed files with 14 additions and 2 deletions

View File

@@ -38,4 +38,10 @@ class UsersController < ActionController::Base
yaml_data = params[:key]
object = YAML.load yaml_data
end
# GOOD
def route6
yaml_data = params[:key]
object = YAML.safe_load yaml_data
end
end