Sha256: 9e185bb7dbcc600d15a2d310e66271a6cc860d547bb247ebb759a8e1883c1ff0

Contents?: true

Size: 733 Bytes

Versions: 69

Compression:

Stored size: 733 Bytes

Contents

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

    included do
      backtrace = ::Rails::VERSION::MAJOR == 4 ? caller(2) : caller_locations(2)
      DEPRECATOR.deprecation_warning("Including Graphiti::Responders", "Use graphiti-rails instead. See https://www.graphiti.dev/guides/graphiti-rails-migration for details.", backtrace)
      include ActionController::MimeResponds
      respond_to(*Graphiti.config.respond_to)
    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

69 entries across 69 versions & 1 rubygems

Version Path
graphiti-1.3.6 lib/graphiti/responders.rb
graphiti-1.3.5 lib/graphiti/responders.rb
graphiti-1.3.4 lib/graphiti/responders.rb
graphiti-1.3.3 lib/graphiti/responders.rb
graphiti-1.3.2 lib/graphiti/responders.rb
graphiti-1.3.1 lib/graphiti/responders.rb
graphiti-1.3.0 lib/graphiti/responders.rb
graphiti-1.2.44 lib/graphiti/responders.rb
graphiti-1.2.43 lib/graphiti/responders.rb
graphiti-1.2.42 lib/graphiti/responders.rb
graphiti-1.2.41 lib/graphiti/responders.rb
graphiti-1.2.40 lib/graphiti/responders.rb
graphiti-1.2.39 lib/graphiti/responders.rb
graphiti-1.2.38 lib/graphiti/responders.rb
graphiti-1.2.37 lib/graphiti/responders.rb
graphiti-1.2.36 lib/graphiti/responders.rb
graphiti-1.2.35 lib/graphiti/responders.rb
graphiti-1.2.34 lib/graphiti/responders.rb
graphiti-1.2.33 lib/graphiti/responders.rb
graphiti-1.2.32 lib/graphiti/responders.rb