We're using active_model_serializers - 0.8.1 in a Rails application.
The app has some API specific controllers inheriting from ActionController::Metal in a way similar to rails-api's ActionController::API.
Well we want to use ActiveModel::Serializers only for the API controllers mentioned above.
Is that possible, how?
Note:
As mentioned in the documentation use of a serializer can explicitly be avoided by replacing
render :json
with:
render :json => @your_object.to_json
We are seeking a more elegant solution than the one above.
Thanks.