Sha256: f7448c17358715f89df348b46750c612236aa7ed9990023f49f37f6558259b94

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

# If you're using Rails + responders gem to get respond_with
module JsonapiCompliable
  module Responders
    extend ActiveSupport::Concern

    included do
      include ActionController::MimeResponds
      respond_to :json, :jsonapi, :xml, :api_json
    end

    # Override to avoid location url generation (for now)
    def respond_with(*args, &blk)
      opts = args.extract_options!
      opts[:location] = nil
      args << opts
      super(*args, &blk)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jsonapi_compliable-1.0.alpha.2 lib/jsonapi_compliable/responders.rb