<% if current_announcement.exists? && !announcement_hidden?(current_announcement) %>
  <div id="announcement">
    <span><%= current_announcement.body.html_safe %></span>
    <span class="hide">
      <%= link_to_function "hide", "hideAnnouncement('announcement_#{current_announcement.created_at}')" %>
    </span>
  </div>
<% end %>

<% if current_announcement.exists? && !announcement_hidden?(current_announcement) %>
  <div id="announcement">
    <span><%= current_announcement.body.html_safe %></span>
    <span class="hide">
      <%= link_to "hide", "#", onclick: "hideAnnouncement('announcement_#{current_announcement.created_at}')" %>
    </span>
  </div>
<% end %>

Remove deprecated Rails link_to_function method
Remove deprecated Rails link_to_function method
