Module: API::Helpers::UsersHelpers

Extended by:
ActiveSupport::Concern, Grape::API::Helpers
Defined in:
lib/api/helpers/users_helpers.rb

Instance Method Summary collapse

Instance Method Details

#model_error_messages(model) ⇒ Object


15
16
17
18
19
20
# File 'lib/api/helpers/users_helpers.rb', line 15

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