Skip to content

Commit 6536419

Browse files
committed
Use content_for :javascript to work with ERB
1 parent 993a95b commit 6536419

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/views/layouts/application.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696

9797
<%= render 'shared/footer' %>
9898

99+
<%= yield :javascript %>
100+
99101
<!-- at the end of the BODY -->
100102
<script>
101103
// Twemoji parse

app/views/shared/_partners.html.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<% content_for :javascript do %>
2-
$(function () {
3-
$('[data-toggle="tooltip"]').tooltip();
4-
});
2+
<script>
3+
$(function() {
4+
$('[data-toggle="tooltip"]').tooltip();
5+
});
6+
</script>
57
<% end %>
68

79
<ul>

0 commit comments

Comments
 (0)