Further spec greening

This commit is contained in:
2015-09-21 16:56:39 +02:00
parent 2c3705790c
commit 61dba311fa
15 changed files with 33 additions and 119 deletions
+3 -1
View File
@@ -69,7 +69,9 @@ private
"#{controller_path.classify}Serializer".constantize
end
end
options[:is_collection] = params[:id].blank? unless options.has_key?(:is_collection)
unless options.has_key?(:is_collection)
options[:is_collection] = params[:id].blank? && %w[new create].exclude?(action_name)
end
JSONAPI::Serializer.serialize(resource, options).to_json
end