Sha256: 4b00051e59f2bd3f97e218501d60b75c975acc85f4ab81e17685491730dc15cd

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

module Whoopsie
  module WhoopsieHelper
    def whoopsie_config(extra = {})
      (<<-EOS).strip_heredoc.html_safe
        <script>
          window.Whoopsie = window.Whoopsie || {};
          window.Whoopsie.enabled                 = #{Rails.application.config.whoopsie.enable.to_json};
          window.Whoopsie.client_notification_url = "#{errors_path}";
          window.Whoopsie.extra = function(){
            var extra = #{extra.to_json};
            extra.location = window.location.toString();
            return extra;
          }
        </script>
      EOS
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whoopsie-0.0.2 app/helpers/whoopsie/whoopsie_helper.rb