Sha256: aab5941257ed63562ef438329e9439f9eb05b05274f51b30de593dfcf1d025a9

Contents?: true

Size: 392 Bytes

Versions: 2

Compression:

Stored size: 392 Bytes

Contents

module Roar::Rails
  module Responder
    module VersionStrategy
      def prepare_model!(model)
        # 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 if respond_to?("empty_#{format}_resource") && model == empty_resource
        super
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
roar-rails-0.0.11 lib/roar/rails/rails3_0_strategy.rb
roar-rails-0.0.10 lib/roar/rails/rails3_0_strategy.rb