module DaisybillApi::Ext::CRUD::Update::InstanceMethods
Public Instance Methods
save()
click to toggle source
Updating a record¶ ↑
pt = DaisybillApi::Models::Patient.find(12) # => <DaisybillApi::Models::Patient id: 12...> pt.telephone # => "2138888888" pt.telephone = "2137777777" # => "2137777777" pt.telephone # => "2137777777" pt.save # => true
# File lib/daisybill_api/ext/crud/update.rb, line 21 def save return update unless new_record? return create if respond_to? :create message = "#save method is not supported for new record" DaisybillApi.logger.error message raise NotImplementedError.new message end
update()
click to toggle source
@private
# File lib/daisybill_api/ext/crud/update.rb, line 30 def update send_data :patch, show_path end