Currently working on a project on my local machine to learn RoR. When I navigate to localhost:3000, the page looks great. The masonry animations work just fine.
However, if at any point I click my navbar-brand to go back to localhost:3000, the masonry does not work. However, if I refresh the page, the masonry returns.
I tried a few different things, but each has been giving me other errors..
Here is how my html, head, and body in application.html.haml
are set up (the right way, I think):
!!! 5
%html
%head
%title My App
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-eval' => true
= csrf_meta_tags
%body
%nav.navbar.navbar-default
.container
.navbar-brand= link_to "My App", root_path
If I purposefully set the %head indentation back so it is just under %head:
!!! 5
%html
%head
%title My App
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-eval' => true
= csrf_meta_tags
%body
%nav.navbar.navbar-default
.container
.navbar-brand= link_to "My App", root_path
then the issue where masonry does not apply on redirect back to index is gone. However, another issue then presents itself. I have a confirm for my delete, so with this setup the confirm box does not go away even after I click OK. That happens in my show.html.haml here:
= link_to "Remove", shape_path, method: :delete,
data: { confirm: "Click OK to remove" }
I am really lost and would appreciate some help. Thank you.