Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7702085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:08:45+00:00 2026-05-31T23:08:45+00:00

I was using gon with my project, but decided I didn’t want it anymore.

  • 0

I was using gon with my project, but decided I didn’t want it anymore.

With gon, application.html.erb looks like this:

<!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>

Without gon, application.html.erb looks like this:

<!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>

All I did was remove the <%= include_gon %> line. When I do this, however, none of my remote forms work anymore. The callbacks just don’t get called. If I put the <%= include_gon %> line back in, the callbacks work again.

Is there a process to remove gon from a project?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:08:46+00:00Added an answer on May 31, 2026 at 11:08 pm

    I had a reference to gon in a buried JS file. For some reason, I wasn’t getting an error about gon being undefined, and that error was silently killing the rest of the js interpretation.

    Also, I was using slickgrid. One of the included files with slickgrid seems to be somehow catching the focus of the ajax callbacks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
I want to do a JOIN with LINQ using an OR statement. Here is
Using Android TelephonyManager an application can obtain the state of data activity over the
Using Jenkins or Hudson I would like to create a pipeline of builds with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.