Class: ActiveResource::Errors

Inherits:
Object
  • Object
show all
Defined in:
lib/qoolife-api/errors.rb

Instance Method Summary collapse

Instance Method Details

#from_hash_with_pre_processing(messages, save_cache = false) ⇒ Object Also known as: from_hash



3
4
5
6
7
8
9
10
11
# File 'lib/qoolife-api/errors.rb', line 3

def from_hash_with_pre_processing(messages, save_cache = false)
  new_messages = if messages['error'] == 'invalid_resource'
      messages['messages']
    else
      messages
    end

  from_hash_without_pre_processing(new_messages,save_cache)
end