Sha256: 627d75c2b545fea5a4d6ae8299cc26b948c8b8760c5ddb027aa845e92ec40986

Contents?: true

Size: 259 Bytes

Versions: 5

Compression:

Stored size: 259 Bytes

Contents

module Mrkt
  module CrudHelpers
    def map_lead_ids(lead_ids)
      lead_ids.map { |id| { id: id } }
    end

    def json_payload(req, payload)
      req.headers[:content_type] = 'application/json'
      req.body = JSON.generate(payload)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mrkt-0.9.0 lib/mrkt/concerns/crud_helpers.rb
mrkt-0.8.0 lib/mrkt/concerns/crud_helpers.rb
mrkt-0.7.0 lib/mrkt/concerns/crud_helpers.rb
mrkt-0.6.2 lib/mrkt/concerns/crud_helpers.rb
mrkt-0.6.1 lib/mrkt/concerns/crud_helpers.rb