I am using Ruby on Rails 4. -- app/views/layouts/application.html.erb contains:

```
<!DOCTYPE html>
<html>
  <head>
    <%= javascript_include_tag "application" %>
  </head>
  <body>
    <canvas id="can"></canvas>
    <%= link_to "link to here", "#" %> 
    <button onclick="task()" >make square</button>
  </body>
  <script>
    function task(){
      var c = document.getElementById("can");
      var ctx = c.getContext("2d");
      ctx.fillStyle="#FF0000";
      ctx.fillRect(0,0,c.width,c.height);
    }
  </script>
</html>

```

--app/assets/javascripts/application.js contains:

```
//= require turbolinks

```

This program works fine on my workstation in Chrome and Firefox. On my ipad in Safari, however, when I click the link I can no longer make the canvas reappear by clicking the button. The button works when I reload the page. If I remove the 4th line of application.html.erb then Safari behaves like Chrome and the button works at all times. However, without line 4, the link no longer causes the box to go away.

This is my first rails project. I am at a complete loss here and any help, insights, clues, or suggestions would be greatly appreciated. Thank you in advance. --laertiades