Method: MintsHelper#correct_json
- Defined in:
- lib/mints/helpers/mints_helper.rb
#correct_json(data) ⇒ Object
Correct json.
Receives a json data and convert it to a symbolized object.
Parameters
- data
-
(Hash) – Data to be submitted.
42 43 44 45 46 47 48 |
# File 'lib/mints/helpers/mints_helper.rb', line 42 def correct_json(data) if data.is_a? String data = JSON.parse(data) end data.symbolize_keys end |