Method: ActiveRemote::Persistence#remote
- Defined in:
- lib/active_remote/persistence.rb
#remote(endpoint, request_args = scope_key_hash) ⇒ Object
Executes a remote call on the current object and serializes it’s attributes and errors from the response.
Defaults request args to the scope key hash (e.g., { guid: ‘ABC-123’ }) when none are given. Returns false if the response contained errors; otherwise, returns true.
167 168 169 170 171 172 |
# File 'lib/active_remote/persistence.rb', line 167 def remote(endpoint, request_args = scope_key_hash) response = remote_call(endpoint, request_args) assign_attributes_from_rpc(response) success? end |