forked from thoughtbot/hoptoad_notifier
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first pass at changing JS html insertion into helper instead
- Loading branch information
1 parent
6790b36
commit a5163c7
Showing
8 changed files
with
65 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
<script type="text/javascript"> | ||
//<![CDATA[ | ||
var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://"); | ||
document.write(unescape("%3Cscript src='" + notifierJsScheme + "<%= host %>/javascripts/notifier.js' type='text/javascript'%3E%3C/script%3E")); | ||
//]]> | ||
</script> | ||
<%= javascript_tag %Q{ | ||
var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://"); | ||
document.write(unescape("%3Cscript src='" + notifierJsScheme + "#{host}/javascripts/notifier.js' type='text/javascript'%3E%3C/script%3E")); | ||
} | ||
-%> | ||
<script type="text/javascript"> | ||
Hoptoad.setKey('<%= api_key %>'); | ||
Hoptoad.setHost('<%= host %>'); | ||
Hoptoad.setEnvironment('<%= environment %>'); | ||
Hoptoad.setErrorDefaults({ | ||
url: "<%= a = "#{controller.request.protocol}#{controller.request.host_with_port}#{controller.request.request_uri}"; p a; a %>", | ||
component: "<%= controller.controller_name %>", | ||
action: "<%= controller.action_name %>" | ||
}); | ||
</script> | ||
<%= javascript_tag %Q{ | ||
Hoptoad.setKey('#{api_key}'); | ||
Hoptoad.setHost('#{host}'); | ||
Hoptoad.setEnvironment('#{environment}'); | ||
Hoptoad.setErrorDefaults({ url: "#{escape_javascript url}", component: "#{controller_name}", action: "#{action_name}" }); | ||
} | ||
-%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.