- bugsnag_js_key = ENV['BUGSNAG_JS_KEY'] || ENV['BUGSNAG_API_KEY']
- if bugsnag_js_key.present?
  %script{src: "//d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js"}
  :javascript
    Bugsnag.start({
      apiKey: "#{bugsnag_js_key}",
      releaseStage: "#{Rails.env}"
    })
