Module: LHS::Record::Destroy::ClassMethods

Defined in:
lib/lhs/concerns/record/destroy.rb

Instance Method Summary collapse

Instance Method Details

#destroy(args, options = nil) ⇒ Object


11
12
13
14
15
# File 'lib/lhs/concerns/record/destroy.rb', line 11

def destroy(args, options = nil)
  options = {} if options.blank?
  params = args.respond_to?(:to_h) ? args : { id: args }
  request(options.merge(params: params, method: :delete))
end