From 3c197dde17c4a23fd633485a6bfcd9f14f8aa128 Mon Sep 17 00:00:00 2001 From: Joe Woodward Date: Sun, 2 Sep 2018 20:02:21 +0700 Subject: [PATCH] point to attributes if no pointer is passed --- lib/jsonapi/rails/serializable_active_model_errors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsonapi/rails/serializable_active_model_errors.rb b/lib/jsonapi/rails/serializable_active_model_errors.rb index a97ec71..f6c4d08 100644 --- a/lib/jsonapi/rails/serializable_active_model_errors.rb +++ b/lib/jsonapi/rails/serializable_active_model_errors.rb @@ -11,7 +11,7 @@ class SerializableActiveModelError < Serializable::Error end source do - pointer @pointer unless @pointer.nil? + pointer(@pointer || '/data/attributes') end end