I am doing a project in rails, I would like to know How do I check whether I am running in developer mode or production mode in code ?
Thanks
Rails.env == "production" Rails.env == "development"
As mentioned by @xoebus, this is far better:
Rails.env.production? Rails.env.development?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With