You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use metadata with my Her model. While the middlware segregates the response into data, errors and metadata, but on model initialization the parameters of metadata being send-in are parsed_data[:data] instead of parsed_data[:metadata].
Saw your comment #16 (comment)
Was curious to know if it is something that has been done intentionally or is it some feature in-dev?
The text was updated successfully, but these errors were encountered:
If your model data has a metadata key, it’s going to be parsed by the detault middleware (here) and passed to the initializer through the :_metadata special key (here). The initializer is going to keep it in the resource’s metadata accessor (here). Same thing goes for the errors key, which is stored in the response_errors accessor.
There was a typo in the find method though, so that currently only works in the master branch.
I was trying to use metadata with my Her model. While the middlware segregates the response into data, errors and metadata, but on model initialization the parameters of metadata being send-in are parsed_data[:data] instead of parsed_data[:metadata].
Saw your comment
#16 (comment)
Was curious to know if it is something that has been done intentionally or is it some feature in-dev?
The text was updated successfully, but these errors were encountered: