0
我有一個rails 4應用程序,我正在處理它並將它推送到heroku。當我渲染新的視圖時,我會在頁面加載之間產生隨機閃爍,包括我的application.html中的頂部欄,所以我認爲它不應該有很長的加載時間。我認爲這是由於頁面呈現的速度,但我不確定。我正在使用Zurb基金會,所以我禁用了turbo鏈接。有什麼方法可以解決這個問題/可能導致這種情況發生的原因嗎?以下是應用程序HTML,以及指向我的應用程序的鏈接。Rails頁面渲染不正確,負載之間閃爍
<!DOCTYPE html>
<html>
<head>
<title>
<%= content_for?(:title) ? yield(:title) : "Kaizano" %>
</title>
<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "vendor/modernizr" %>
<%= csrf_meta_tags %>
<link rel="stylesheet" href="css/foundation-icons.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="page-body">
<nav class='top-bar' data-topbar>
<ul class="title-area">
<li class="name">
<h1 class="title-font"><%= link_to "Kaizano", root_path %></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#">Menu</a></li>
</ul>
<div class="fixed">
<section class="top-bar-section">
<ul class="right">
<% if user_signed_in? %>
<li><%= link_to "Join a Presentation", events_path %></li>
<li><%= link_to "Me", user_path(current_user) %></li>
<li><%= link_to "Sign out", destroy_user_session_path, :method => :delete %></li>
<li class="has-dropdown">
<a href="#">More</a>
<ul class="dropdown">
<li><%= link_to "How it Works", how_it_works_path %></li>
<li><%= link_to "About", learn_mores_path %></li>
<li><%= link_to "Contact Us",new_contact_form_path %></li>
</ul>
</li>
<% else %>
<li><%= link_to "Join a Presentation", events_path %></li>
<li><%= link_to "About", learn_mores_path %></li>
<li><%= link_to "Sign Up",new_user_registration_path %></li>
<li><%= link_to "Sign In",new_user_session_path %></li>
<li class="has-dropdown">
<a href="#">More</a>
<ul class="dropdown">
<li><%= link_to "How it Works",how_it_works_path %></li>
<li><%= link_to "Contact Us",new_contact_form_path %></li>
</ul>
</li>
<% end %>
</ul>
</section>
</nav>
<%= yield %>
o</body>
</html>