I have a method that works in the scope of a Sinatra application that checks if the request is safe:
secure_request?
request.env[ 'HTTPS' ] == 'on'
end
It works fine, but when I call it from another class that does not use the area Sinatra application, it tries to perform a query to check stands, creating a mistake wrong number of arguments (0 for 1).
So, is there a way to explicitly specify a request for a Sinatra application, for example, self.requestor app.request?
source
share