Sha256: 7724bb03b6f46dd711663e6e0334a79d23b7bb0ab50e90344b129595fb3cd890
Contents?: true
Size: 323 Bytes
Versions: 12
Compression:
Stored size: 323 Bytes
Contents
module ContentTypeHelpers %w(put patch post delete).each do |method| define_method :"#{method}_with_json" do |uri, params = {}, env = {}, &block| params = params.to_json env['CONTENT_TYPE'] ||= 'application/json' send(method, uri, params, env, &block) end end end include(ContentTypeHelpers)
Version data entries
12 entries across 12 versions & 1 rubygems