Active_model_serializers: serializer: nil doesn't exclude object from serializer

Created on 12 Nov 2017  路  4Comments  路  Source: rails-api/active_model_serializers

I expect the line
render json: @breeds, serializer: nil
to allow me to skip the active model serializer, but it doesn't

What is the proper syntax?

Most helpful comment

Nevermind found that
adapter: nil
works

All 4 comments

Nevermind found that
adapter: nil
works

2018-June-13
Rails 5, adapter: nil work for me, Thanks @greggawatt !
serializer: nil doesn't work for me

Idk but at log:

I, [2018-08-21T03:57:21.486177 #7]  INFO -- : [123b6fc9-1197-4d1c-b653-075b728bafa1] [active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (32.68ms)

I still getting this...

adapter: nil works.

Was this page helpful?
0 / 5 - 0 ratings