module Desponders::RestResponder
Public Instance Methods
to_format()
click to toggle source
Calls superclass method
# File lib/desponders/rest_responder.rb, line 3 def to_format case when get? display(resource, status: :ok) when has_errors? super when post? display(resource, status: :created) when put? display(resource, status: :ok) when delete? display({}, status: :no_content) end end