Rails (3.1) アプリを Internet Explorer で表示すると、何らかの理由でページの最後に HTML タグが表示されることがありますが、Chrome や Firefox では表示されません。特に、完全なタグではなく、タグの一部が表示され</h
ますが、その一部が</htm
テキストとして表示されます (ページの下部)。
私のレイアウトテンプレートには、これがあります:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%= title %></title>
<% if params[:controller] == 'pages' %>
<%= stylesheet_link_tag "static_pages", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" %>
<% elsif %>
<%= stylesheet_link_tag "bootstrap", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" %>
<% end %>
<%= javascript_include_tag "https://ws.sharethis.com/button/buttons.js", "admin.js" %>
<%= csrf_meta_tag %>
<script type="text/javascript" charset="utf-8">
//jQuery.noConflict();
jQuery.extend( jQuery.fn.dataTableExt.oStdClasses, {
"sSortAsc": "header headerSortDown",
"sSortDesc": "header headerSortUp",
"sSortable": "header"
} );
jQuery(document).ready(function() {
jQuery('#datatable').dataTable( {
"sDom": "<'row'<'span5'l><'span8'f>r>t<'row'<'span4'i><'span8'p>>",
"sPaginationType": "bootstrap"
} );
} );
</script>
<%= yield :javascript%>
<%= yield :script%>
</head>
<body>
</body>
</html>
ビュー用に生成された html ソース コードを見ると、ソースが終了している Chrome/Firefox (または IE のような部分的なコード)</body>
ではないことがわかります。</html>
誰かが私が間違っていることを教えてもらえますか? ありがとうございました。