1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/test/ujs/views/layouts/application.html.erb

27 lines
940 B
Text
Raw Normal View History

2016-11-25 23:42:29 -05:00
<!DOCTYPE html>
<html id="html">
<head>
<title><%= @title %></title>
<%= csp_meta_tag %>
2016-11-25 23:42:29 -05:00
<link href="/vendor/qunit.css" media="screen" rel="stylesheet" type="text/css" media="screen, projection" />
<script src="/vendor/jquery-2.2.0.js" type="text/javascript"></script>
<%= javascript_tag nonce: true do %>
2016-11-25 23:42:29 -05:00
// This is for test in override.js.
// Must go before rails-ujs.
2017-02-21 13:41:17 -05:00
document.addEventListener('rails:attachBindings', function() {
window.Rails.linkClickSelector += ', a[data-custom-remote-link]';
2016-11-25 23:42:29 -05:00
// Hijacks link click before ujs binds any handlers
// This is only used for ctrl-clicking test on remote links
2017-02-21 13:41:17 -05:00
window.Rails.delegate(document, '#qunit-fixture a', 'click', function(e) {
2016-11-25 23:42:29 -05:00
e.preventDefault();
});
});
<% end %>
<%= javascript_include_tag "/rails-ujs.js" %>
2016-11-25 23:42:29 -05:00
</head>
<body id="body">
<%= yield %>
</body>
</html>