Module: LHS::Item::Destroy

Extended by:
ActiveSupport::Concern
Included in:
LHS::Item
Defined in:
lib/lhs/concerns/item/destroy.rb

Instance Method Summary collapse

Instance Method Details

#destroy(options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/lhs/concerns/item/destroy.rb', line 10

def destroy(options = {})
  options ||= {}
  options = options.merge(method: :delete)
  data = _data._raw.dup
  url = url_for_deletion!(options, data)
  options = options.merge(url: url)
  _data._request = _data.class.request(options)._request
  _data
end