What’s the proper way to determine the environment? Right now I’m using:
class Main < Sinatra::Base
get '/' do
puts self.class.development?
puts self.class.production?
end
end
But it doesn’t seem right.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
self.class.development?should actually work. These all work for me on Sinatra 1.3.1: