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.7.6 lib/graphiti/responders.rb
graphiti-1.7.5 lib/graphiti/responders.rb
graphiti-1.7.4 lib/graphiti/responders.rb
graphiti-1.7.3 lib/graphiti/responders.rb
graphiti-1.7.2 lib/graphiti/responders.rb
graphiti-1.7.1 lib/graphiti/responders.rb
graphiti-1.7.0 lib/graphiti/responders.rb
graphiti-1.6.4 lib/graphiti/responders.rb
graphiti-1.6.3 lib/graphiti/responders.rb
graphiti-1.6.2 lib/graphiti/responders.rb
graphiti-1.6.1 lib/graphiti/responders.rb
graphiti-1.6.0 lib/graphiti/responders.rb
graphiti-1.5.3 lib/graphiti/responders.rb
graphiti-1.5.2 lib/graphiti/responders.rb
graphiti-1.5.1 lib/graphiti/responders.rb
graphiti-1.5.0 lib/graphiti/responders.rb
graphiti-1.4.0 lib/graphiti/responders.rb
graphiti-1.3.9 lib/graphiti/responders.rb
graphiti-1.3.8 lib/graphiti/responders.rb
graphiti-1.3.7 lib/graphiti/responders.rb