summaryrefslogtreecommitdiff
path: root/lib/api/helpers/users_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/users_helpers.rb')
-rw-r--r--lib/api/helpers/users_helpers.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/helpers/users_helpers.rb b/lib/api/helpers/users_helpers.rb
index 99eefc1cbb9..2d7b22e66b3 100644
--- a/lib/api/helpers/users_helpers.rb
+++ b/lib/api/helpers/users_helpers.rb
@@ -11,6 +11,13 @@ module API
params :optional_index_params_ee do
end
+
+ def model_error_messages(model)
+ super.tap do |error_messages|
+ # Remapping errors from nested associations.
+ error_messages[:bio] = error_messages.delete(:"user_detail.bio") if error_messages.has_key?(:"user_detail.bio")
+ end
+ end
end
end
end