开发者

Rails - How do I check developer mode or production mode in code

I am doing a project in rails, I would like to know开发者_Go百科 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?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜