Sha256: 05c061087caaae3817ae9be49b0f9ead173bafd3c8e15186e378f94c2a0b55c3

Contents?: true

Size: 354 Bytes

Versions: 113

Compression:

Stored size: 354 Bytes

Contents

require 'active_support'

class LHS::Record

  module Destroy
    extend ActiveSupport::Concern

    module ClassMethods
      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
    end
  end
end

Version data entries

113 entries across 113 versions & 1 rubygems

Version Path
lhs-16.1.5 lib/lhs/concerns/record/destroy.rb
lhs-16.1.4 lib/lhs/concerns/record/destroy.rb
lhs-16.1.3 lib/lhs/concerns/record/destroy.rb
lhs-16.1.2 lib/lhs/concerns/record/destroy.rb
lhs-16.1.1 lib/lhs/concerns/record/destroy.rb
lhs-16.1.0 lib/lhs/concerns/record/destroy.rb
lhs-16.0.1 lib/lhs/concerns/record/destroy.rb
lhs-16.0.0 lib/lhs/concerns/record/destroy.rb
lhs-15.7.0 lib/lhs/concerns/record/destroy.rb
lhs-15.6.1 lib/lhs/concerns/record/destroy.rb
lhs-15.6.0 lib/lhs/concerns/record/destroy.rb
lhs-15.5.1 lib/lhs/concerns/record/destroy.rb
lhs-15.5.0 lib/lhs/concerns/record/destroy.rb
lhs-15.4.1 lib/lhs/concerns/record/destroy.rb
lhs-15.4.0 lib/lhs/concerns/record/destroy.rb
lhs-15.4.0.pre.hasone.1 lib/lhs/concerns/record/destroy.rb
lhs-15.3.3 lib/lhs/concerns/record/destroy.rb
lhs-15.3.3.pre.fixoptions.1 lib/lhs/concerns/record/destroy.rb
lhs-15.3.2 lib/lhs/concerns/record/destroy.rb
lhs-15.3.1 lib/lhs/concerns/record/destroy.rb