Class: InfinumJsonApiSetup::JsonApi::Responder

Inherits:
ActionController::Responder
  • Object
show all
Defined in:
lib/infinum_json_api_setup/json_api/responder.rb

Instance Method Summary collapse

Instance Method Details

#to_json_apiObject



4
5
6
7
8
9
10
# File 'lib/infinum_json_api_setup/json_api/responder.rb', line 4

def to_json_api
  if !get? && has_errors?
    display_errors
  else
    display_resource
  end
end