Is there any proper way to detect the environment (development or production) in the application layout? Say, I don’t want to render the GA code in my local sandbox.
In Django we use {% if not debug %}{% include '_ga.html' %}{% endif %}. What should I use in Rails? Thanks.
You can use:
See docs for further information. So, you could do something like: