I might store the key and filter in an object literal -- it will give you more flexibility.

Also, you shouldn't be checking in this key in JS like this -- it's too easy to miss and not especially secure.  For clarity only, you could store it in a [yml configuration file](http://railscasts.com/episodes/85-yaml-configuration-revised).  The best and most secure option would be to store it in an ENV variable (which you can [set up on heroku](https://devcenter.heroku.com/articles/config-vars).  

To load the data from ruby into JS, you can either make this a `.js.erb` file and put it in the `views