Sha256: e02cb877079eadcf22269a21f590be0ec9bb4a3bcc7ea4f468a944502c4364a2

Contents?: true

Size: 532 Bytes

Versions: 7

Compression:

Stored size: 532 Bytes

Contents

# For use with the `responders` gem responders gem to get respond_with
module Graphiti
  module Rails
    module Responders
      extend ActiveSupport::Concern

      included do
        include ActionController::MimeResponds
        respond_to(*Graphiti::Rails.respond_to_formats)
      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
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
graphiti-rails-0.4.0 lib/graphiti/rails/responders.rb
graphiti-rails-0.3.0 lib/graphiti/rails/responders.rb
graphiti-rails-0.2.4 lib/graphiti/rails/responders.rb
graphiti-rails-0.2.3 lib/graphiti/rails/responders.rb
graphiti-rails-0.2.2 lib/graphiti/rails/responders.rb
graphiti-rails-0.2.1 lib/graphiti/rails/responders.rb
graphiti-rails-0.2.0 lib/graphiti/rails/responders.rb