Sha256: f265290af43f70d27b434be4b55d027135b8f001ec16d158f5132185ae5ecd40
Contents?: true
Size: 654 Bytes
Versions: 11
Compression:
Stored size: 654 Bytes
Contents
module Roqua module CoreApi # @api private class UpdatePerson < Base object :session, class: Sessions::AuthSession object :person, class: Models::Person # Saves the person attributes to server. # Returns true on success, false on validation errors. # Adds errors to person object based on I18n errors.messages. # Raises on other errors. def execute response = session.patch "/people/#{person.id}", person: person.serializable_hash if response.code == 422 errors_to_object(response, person) false else true end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems