aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/ujs/views/layouts/application.html.erb
blob: 8f6f6fc17fc17298c73b00c58abd34039162c1ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html id="html">
  <head>
    <title><%= @title %></title>
    <%= csp_meta_tag %>
    <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 %>
      // This is for test in override.js.
      // Must go before rails-ujs.
      document.addEventListener('rails:attachBindings', function() {
        window.Rails.linkClickSelector += ', a[data-custom-remote-link]';
        // Hijacks link click before ujs binds any handlers
        // This is only used for ctrl-clicking test on remote links
        window.Rails.delegate(document, '#qunit-fixture a', 'click', function(e) {
          e.preventDefault();
        });
      });
    <% end %>
    <%= javascript_include_tag "/rails-ujs.js" %>
  </head>

  <body id="body">
    <%= yield %>
  </body>
</html>