How to extract all attributes with Rails Jbuilder?
Maybe you can use json.merge!
.
json.merge! notification.attributes
https://github.com/rails/jbuilder/blob/master/lib/jbuilder.rb#L277
I'm using jbuilder 1.5.0 and merge! didn't work but I found an alternative syntax:
json.(notification, *notification.attributes.keys)