Skip to content

Commit

Permalink
Handle render.ams with nil serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Mar 29, 2016
1 parent 84197e4 commit c206c7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/active_model_serializers/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def notify_render(*)
end

def notify_render_payload
{ serializer: serializer, adapter: adapter }
{
serializer: serializer || ActiveModel::Serializer.allocate,
adapter: adapter || ActiveModelSerializers::Adapter::Base.allocate
}
end

private
Expand Down

0 comments on commit c206c7c

Please sign in to comment.