Create (i.e. save to the remote service) the new resource.
# 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
Update the resource on the remote service
# 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
# File lib/active_resource/singleton.rb, line 108 def singleton_path(options = nil) self.class.singleton_path(options || prefix_options) end