Sha256: e88f55ab80bab00fc25d75dbab998ae4003cab4e6f4fa427d635fec137416059

Contents?: true

Size: 631 Bytes

Versions: 7

Compression:

Stored size: 631 Bytes

Contents

module Roar::Rails
  class Responder < ActionController::Responder
    module VersionStrategy
      def prepare_model_for(format, model, *args)
        # rails <= 3.1 compatibility. #display gets called for empty responses
        # >= 3.2 fixes by calling #head, not #display for all empty bodies (PUT, DELETE)
        return model if respond_to?("empty_#{format}_resource") && model == empty_resource
        super
      end
    end
  end

  module TestCase
    module VersionStrategy
      def process_args(action, http_method, document="", params={})
        [action, params, nil, nil, http_method]
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/roar-rails-1.2.0/lib/roar/rails/rails3_0_strategy.rb
roar-rails-1.2.0 lib/roar/rails/rails3_0_strategy.rb
roar-rails-1.1.0 lib/roar/rails/rails3_0_strategy.rb
roar-rails-1.0.2 lib/roar/rails/rails3_0_strategy.rb
roar-rails-1.0.1 lib/roar/rails/rails3_0_strategy.rb
roar-rails-1.0.0 lib/roar/rails/rails3_0_strategy.rb
roar-rails-0.1.6 lib/roar/rails/rails3_0_strategy.rb