Hi,
From within my rails app code, is it possible to get the current environment in which it is running? Such as development / production.
Regards,
Hi,
From within my rails app code, is it possible to get the current environment in which it is running? Such as development / production.
Regards,
Fernando Perez wrote:
Hi,
From within my rails app code, is it possible to get the current environment in which it is running? Such as development / production.
Regards,
use <%=RAILS_ENV%>
use <%=RAILS_ENV%>
Thanks!
or you can do Rails.env.production?
ENV['RAILS_ENV']