method
from_json
v3.0.0 -
Show latest stable
- Class:
ActiveModel::Serializers::JSON
from_json(json)public
No documentation available.
# File activemodel/lib/active_model/serializers/json.rb, line 96
def from_json(json)
hash = ActiveSupport::JSON.decode(json)
hash = hash.values.first if include_root_in_json
self.attributes = hash
self
end