intercom/intercom-rails — pull request #44 by kalv (2013-06-19 17:05:11+00:00)
Title: Developers can set environments for automatic javascript insertion

I know there is another pull request (intercom/intercom-rails#41) to force only js insertion in production but that would break the intercom sign up flow, so I worked on this alternative.

I eventually went with string names in the config and calling Rails.env from within the filter callback. I had noticed that there wasn't any other references to Rails but thought it would be ok considering this is a gem for Rails only.

Also in the tests I couldn't figure out a neater way to set the Rails.env - happy to change to something else.