Sha256: dace5758bbeb114a7757da752f706fb3cd53432906ebec34515df9c2b4553002

Contents?: true

Size: 499 Bytes

Versions: 22

Compression:

Stored size: 499 Bytes

Contents

module Garage::OptionalResponseBodyResponder
  protected

  def api_behavior(*)
    case
    when put? && options[:put] && options[:put][:body]
      display resource, status: options[:put][:status] || :ok
    when patch? && options[:patch] && options[:patch][:body]
      display resource, status: options[:patch][:status] || :ok
    when delete? && options[:delete] && options[:delete][:body]
      display resource, status: options[:delete][:status] || :ok
    else
      super
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
the_garage-2.8.2 lib/garage/optional_response_body_responder.rb
the_garage-2.8.1 lib/garage/optional_response_body_responder.rb
the_garage-2.8.0 lib/garage/optional_response_body_responder.rb
the_garage-2.7.0 lib/garage/optional_response_body_responder.rb
the_garage-2.6.1 lib/garage/optional_response_body_responder.rb
the_garage-2.6.0 lib/garage/optional_response_body_responder.rb
the_garage-2.5.0 lib/garage/optional_response_body_responder.rb
the_garage-2.4.4 lib/garage/optional_response_body_responder.rb
the_garage-2.4.3 lib/garage/optional_response_body_responder.rb
the_garage-2.4.2 lib/garage/optional_response_body_responder.rb
the_garage-2.4.1 lib/garage/optional_response_body_responder.rb
the_garage-2.4.0 lib/garage/optional_response_body_responder.rb
the_garage-2.3.3 lib/garage/optional_response_body_responder.rb
the_garage-2.3.2 lib/garage/optional_response_body_responder.rb
the_garage-2.3.1 lib/garage/optional_response_body_responder.rb
the_garage-2.3.0 lib/garage/optional_response_body_responder.rb
the_garage-2.2.0 lib/garage/optional_response_body_responder.rb
the_garage-2.1.0 lib/garage/optional_response_body_responder.rb
the_garage-2.0.3 lib/garage/optional_response_body_responder.rb
the_garage-2.0.2 lib/garage/optional_response_body_responder.rb