Description
I'm not sure whether this issue should be opened here or on the rails-api
repository so let me know if this is the wrong place.
Anyway, active_model_serializers
does not work out of the box with a new rails-api
project, as the JSON responses aren't being overridden. I found this Stack Overflow question, which resulted in one solution: making ApplicationController
inherit from ActionController::Base
instead of ActionController::API
. With this I found out that ApplicationController
needs ActionController::Serialization
for AMS to work.
For those of you that are experiencing the issue, that means that you can just add the following to ApplicationController
to work around the issue for now:
include ActionController::Serialization
If this behaviour is intended, shouldn't it be mentioned in the README?
I'm on Rails 4.1.5, rails-api 0.2.1 and active_model_serializers 0.9.0.