2
目前我正在構建Rails 3.1應用程序,並使其運行完美。然而,我注意到我的標記目前包含在所有頁面上的這個元素:Rails 3.1中的directions_extension是什麼?
<div id="directions_extension" style="position: absolute !important; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: rgb(238, 238, 255) !important; border-top-width: 1px !important; border-right-width: 1px !important; border-bottom-width: 1px !important; border-left-width: 1px !important; border-top-style: solid !important; border-right-style: solid !important; border-bottom-style: solid !important; border-left-style: solid !important; border-top-color: rgb(170, 170, 255) !important; border-right-color: rgb(170, 170, 255) !important; border-bottom-color: rgb(170, 170, 255) !important; border-left-color: rgb(170, 170, 255) !important; padding-top: 3px !important; padding-right: 3px !important; padding-bottom: 3px !important; padding-left: 3px !important; display: none; border-top-left-radius: 5px 5px !important; border-top-right-radius: 5px 5px !important; border-bottom-right-radius: 5px 5px !important; border-bottom-left-radius: 5px 5px !important; background-position: initial initial !important; background-repeat: initial initial !important; "></div>
我不知道這個元素來自哪裏。我已經檢查過我的佈局,並確保一切都正常關閉,但仍然沒有抓住它可能來自哪裏。我的模板看起來是這樣的:
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="biotech tools for the future">
<meta name="keywords" content="biotech, biotechnology, tools, dna, analysis">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= csrf_meta_tags %>
<title>bioDome :: reliable and stable bio tools</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "libs/modernizr.min" %>
</head>
<body>
<div id="container">
<header>
<h1>bioDome</h1>
<nav>
<ul>
<li><%= link_to 'home', root_path %></li>
<li><%= link_to 'contact', contact_path %></li>
<li><%= link_to 'users', users_path %></li>
</ul>
</nav>
</header><!-- header -->
<div id="main" role="main">
<section id="<%= params[:controller] %>" class="<%= "#{params[:controller]}-#{params[:action]}" %>">
<%= yield %>
</section>
</div><!-- #main -->
<footer>
</footer> <!-- footer -->
</div><!-- #container -->
<%= javascript_include_tag "application" %>
</body>
</html>
任何想法,這directions_extension可能是從哪裏來的,如果是的話,如何去除呢?
您是否搜索過您的代碼庫?你是否在你使用的寶石代碼裏搜索?使用'grep'或者在你的編輯器中進行項目範圍的搜索。 – molf
是的,我做到了。沒有提出grep搜索。它必須是Rails 3.1框架的一部分,因爲我在另一個mac上創建了一個新的rails應用程序,同樣的事情發生在生成的html中。 – alvincrespo