lib/restpack_serializer/serializable.rb in restpack_serializer-0.4.21 vs lib/restpack_serializer/serializable.rb in restpack_serializer-0.4.23
- old
+ new
@@ -26,9 +26,13 @@
include RestPack::Serializer::Filterable
include RestPack::Serializer::SideLoading
class InvalidInclude < Exception; end
+ def array_as_json(models, context = {})
+ as_json(models, context)
+ end
+
def as_json(model, context = {})
return if model.nil?
if model.kind_of?(Array)
return model.map { |item| as_json(item, context) }
end