0
私のプロジェクトでgonを使用していましたが、もうそれが欲しくないと決めました。 application.html.erb
は次のようになり、坤でGonを削除するとRails 3 remoteは動作を停止します
:application.html.erb
、坤がなけれ
<!DOCTYPE html>
<html>
<head>
<title><%= full_title(yield :title) %></title>
<%= include_gon %>
<%= render 'layouts/stylesheets' %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tag %>
<!-- Begin Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29558757-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Analytics -->
<!-- Begin favicon.ico -->
<%= favicon_link_tag %>
<!-- End facicon.ico -->
</head>
<body>
<% unless @home %>
<%= render 'layouts/header' %>
<% end %>
<div id="content">
<p style="color: black"><%= notice %></p>
<p style="color: red"><%= alert %></p>
<%= yield %>
</div>
<div style="color: black"><%= debug(params) if Rails.env.development? %> </div>
</body>
</html>
は次のようになります。私がやった
<!DOCTYPE html>
<html>
<head>
<title><%= full_title(yield :title) %></title>
<%= render 'layouts/stylesheets' %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tag %>
<!-- Begin Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29558757-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Analytics -->
<!-- Begin favicon.ico -->
<%= favicon_link_tag %>
<!-- End facicon.ico -->
</head>
<body>
<% unless @home %>
<%= render 'layouts/header' %>
<% end %>
<div id="content">
<p style="color: black"><%= notice %></p>
<p style="color: red"><%= alert %></p>
<%= yield %>
</div>
<div style="color: black"><%= debug(params) if Rails.env.development? %> </div>
</body>
</html>
すべてが<%= include_gon %>
行を削除しました。しかし、私がこれを行うと、私のリモートフォームはもう動作しません。コールバックは呼び出されません。 <%= include_gon %>
行を戻すと、コールバックが再び機能します。
gon
をプロジェクトから削除するプロセスはありますか?