I want to know a way using which a template/partial will always get rendered for all :get request having js/html format
I do not want to place it this inside a layout, as most of our request are js and wont use layout
The purpose here is, I will use this template to set some javascript global variables used throughout the javascript/coffeescript, for instance we want to know the role of the current user or whether current user is admin or not etc so this template will set those values/flags in gs globals etc
What am looking for is a hook into rails rendering engine, that at the end of last template or better before first template, I would like my template get rendered and set these js variables, may be similar to any middleware hook