Class: ApiResponder

Inherits:
ActionController::Responder
  • Object
show all
Defined in:
lib/potassium/assets/api/responder.rb,
lib/potassium/assets/api/draper_responder.rb

Instance Method Summary collapse

Instance Method Details

#respondObject



2
3
4
5
6
7
# File 'lib/potassium/assets/api/responder.rb', line 2

def respond
  return display_errors if has_errors?
  return head :no_content if delete?

  display resource, status_code: status_code
end