Closed caseymct closed 8 years ago
:grimacing:
@apotonick it didn't work on 1.0.4 gem, I had to get the code from master :/
Ah yeah, the 1.0 JSONAPI implementation is completely wrong!!! I should remove it. Or release 1.1!
Hi, same here, using the master with roar-grape works fine, but no chances with roar-rails! Are you planning to update roar-rails to match this fix on json-api? Thanks
Using roar (1.0.4) representable (2.3.0) uber (~> 0.0.7)
I have an Event model - let's say for simplicity it just has a title.
I would like to return a JSON api compliant payload for this, e.g
here is what I have written (edited for simplicity):
and
When I run
EventDecorator.prepare(Event.last).to_json
I get the following:
{"events"=>{"id"=>20, "title"=>"New event"}}
no attributes hash, no
data
property, notype
, etc. what am I doing wrong? thanks!