Closed OrestF closed 1 year ago
def collection_response(collection, *args) options = args.extract_options! render_json( { (options.delete(:root).presence || :items) => serialize_collection(paginate(collection, options), options), count: collection.count }, options[:status] || :ok ) end