Rails - How do I check developer mode or production mode in code
Ruby on-RailsRubyRuby on-Rails-3Ruby on-Rails Problem Overview
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
Ruby on-Rails Solutions
Solution 1 - Ruby on-Rails
Rails.env == "production"
Rails.env == "development"
As mentioned by @xoebus, this is far better:
Rails.env.production?
Rails.env.development?