Sha256: 47592e6d789a89bc785052c71e8d391cc3617cd816174a9935d88e7308697467
Contents?: true
Size: 737 Bytes
Versions: 6
Compression:
Stored size: 737 Bytes
Contents
module PrintsHelper def record_print(printable,options={}) options.reverse_merge!({ :remote => true }) if options[:remote] '<script> (function(){ var ua = navigator.userAgent.toLowerCase(); if (!window.ActiveXObject) { request = new XMLHttpRequest(); } else if (ua.indexOf("msie 5") == -1) { request = new ActiveXObject("Msxml2.XMLHTTP"); } else { request = new ActiveXObject("Microsoft.XMLHTTP"); } var params = {}; request.open("POST", "'+printable.class.name.underscore.pluralize+'/'+printable.id.to_s+'/prints.json"); request.send(params); }()); </script>'.html_safe end end end
Version data entries
6 entries across 6 versions & 1 rubygems