I want to set a global constant (in Rails
) and then depending on that I want to put a condition in a JavaScript
file (which is included in every page of my app). I also have some Rails dependent code based on this variable.
What is the best way to do this ?