Sha256: fcfde4c15b744c8d2a72f2f7381661fb1d5ba1fe0c96ebd3825481cf79011a45
Contents?: true
Size: 598 Bytes
Versions: 6
Compression:
Stored size: 598 Bytes
Contents
<% content_for :javascript do %> <script type="text/javascript"> var eventName = typeof(Turbolinks) !== 'undefined' ? 'turbolinks:load' : 'DOMContentLoaded'; if (!document.documentElement.hasAttribute("data-turbolinks-preview")) { document.addEventListener(eventName, function flash() { <% if flash[:notice] %> SpiffyApp.flashNotice(<%== flash[:notice].to_json %>); <% end %> <% if flash[:error] %> SpiffyApp.flashError(<%== flash[:error].to_json %>); <% end %> document.removeEventListener(eventName, flash) }); } </script> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems