Sha256: 39f2f2b3917cc6da405db302d0f17103ec0dab00563863f1b55ded93cc3b48f1

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

module Alf
  module Sequel
    module UnitOfWork
      class Insert

        def rack_status
          201
        end

        def rack_body
          {status: "success", message: "created"}
        end

        def rack_location(request)
          ids = matching_relation.tuple_extract.to_hash.values
          "#{request.path}/#{ids.join(',')}"
        end

      end # class Insert
    end # module UnitOfWork
  end # module Sequel
end # module Alf

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
alf-rest-0.17.1 lib/alf/rest/alf-ext/unit_of_work/insert.rb
alf-rest-0.16.3 lib/alf/rest/alf-ext/unit_of_work/insert.rb
alf-rest-0.16.2 lib/alf/rest/alf-ext/unit_of_work/insert.rb
alf-rest-0.16.1 lib/alf/rest/alf-ext/unit_of_work/insert.rb
alf-rest-0.16.0 lib/alf/rest/alf-ext/unit_of_work/insert.rb
alf-rest-0.14.0 lib/alf/rest/alf-ext/unit_of_work/insert.rb