class RestMyCase::Context::HttpStatus
Constants
- RAILS_HTTP_STATUS
Public Instance Methods
error_response()
click to toggle source
# File lib/rest_my_case/context/http_status.rb, line 60 def error_response if errors.last_known_error response = errors.last_known_error.dup response.delete :class_name response[:http_status] = http_status response else { message: 'unkown error' } end end
http_status()
click to toggle source
# File lib/rest_my_case/context/http_status.rb, line 56 def http_status RAILS_HTTP_STATUS[status.to_sym] end