1
2
3
4
5
6
7
8
9
10
11
12
|
class ApplicationSerializer < ActiveModel::Serializer
def to_json options = {}
to_hash(options).to_json
end
def to_hash options = {}
options.merge! include: '**'
ActiveModelSerializers::Adapter.create(self, options).serializable_hash
end
end
|