Ich war mit gon mit meinem Projekt, aber entschied, dass ich es nicht mehr wollte.Rails 3 Remote funktioniert nicht mehr, wenn ich Gon entfernen
Mit gon sieht application.html.erb
wie folgt aus:
<!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>
Ohne gon, application.html.erb
wie folgt aussieht:
<!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>
Alles, was ich tat, war die <%= include_gon %>
Linie entfernen. Wenn ich das tue, funktioniert jedoch keines meiner Remote-Formulare mehr. Die Callbacks werden einfach nicht angerufen. Wenn ich die <%= include_gon %>
Zeile wieder einfüge, funktionieren die Callbacks erneut.
Gibt es einen Prozess, um gon
aus einem Projekt zu entfernen?