module ActiveResource::Singleton
Public Instance Methods
Source
Protected Instance Methods
Source
# File lib/active_resource/singleton.rb, line 99 def create connection.post(singleton_path, encode, self.class.headers).tap do |response| self.id = id_from_response(response) load_attributes_from_response(response) end end
Create (i.e. save to the remote service) the new resource.
Source
# File lib/active_resource/singleton.rb, line 92 def update connection.put(singleton_path(prefix_options), encode, self.class.headers).tap do |response| load_attributes_from_response(response) end end
Update the resource on the remote service