class CommunityZero::NotFoundEndpoint
The general 404 endpoint.
@author Seth Vargo <sethvargo@gmail.com>
Public Instance Methods
call(request)
click to toggle source
# File lib/community_zero/endpoints/not_found_endpoint.rb, line 23 def call(request) error("Object not found: #{request.env['REQUEST_PATH']}") end
Private Instance Methods
error(message)
click to toggle source
# File lib/community_zero/endpoints/not_found_endpoint.rb, line 28 def error(message) [ 404, { 'Content-Type' => 'application/json' }, JSON.pretty_generate({ 'error' => message }) ] end