Module: NeetoCommonsBackend::ApiHelpers

Defined in:
lib/neeto_commons_backend/controllers/concerns/api_helpers.rb

Instance Method Summary collapse

Instance Method Details

#full_messages_with_keys_for(errors) ⇒ Object



5
6
7
# File 'lib/neeto_commons_backend/controllers/concerns/api_helpers.rb', line 5

def full_messages_with_keys_for(errors)
  Hash[errors.messages.keys.map { |key| [key, errors.full_messages_for(key)] }]
end