gon icon indicating copy to clipboard operation
gon copied to clipboard

Your Rails variables in your JS

Results 46 gon issues
Sort by recently updated
recently updated
newest added

I have a use case where I would like to add to the gon based on variables that are set in the controller/view - specifically the rails layout being used

![peek 18-12-2018 10-46](https://user-images.githubusercontent.com/1306646/50159069-862d5f00-02b4-11e9-8676-bdba5633a5e3.gif) rails version: 5.2.2 ruby version: 2.5.3 gon version: 6.2.1 I have two actions: ``` class IndexController < ApplicationController def index @your_int = 123 @your_array = [1,2] @your_hash...

This test fails with rails 4 (works with rails 5) even though gemspec says actionpack >= 3.0 as dependency. actionpack >= 5.0 should be added as a development dependency or...

Hi. I found that `json.cache!` was not working when I was using jbuilder template with `gon.jbuilder`. I found this error message: `undefined method controller' for # Did you mean? controller_path`...

Hi, I'm using something like ``` protected def init_gon ... gon.vapid_public_key = Base64.urlsafe_decode64(Rails.application.secrets.vapid[:public_key]) end ``` But the Gon::Base.render_data complains that : "\xD2" from ASCII-8BIT to UTF-8 I've tried different string...

Rails 4 introduced ActionController::Live, and it would be perfect for gon.watch, since it uses another thread and does not overheads the main process.

I set up a gon variable for checking if current user is available in controller. `gon.watch.has_current_user = current_user.present?` I open a page (with current user presents) and duplicate that page...

6.2.0 has been released :tada: https://rubygems.org/gems/gon But we don't have a tag in git. https://github.com/gazay/gon/releases

This is related to #90 and https://github.com/peresleguine/pluggable_js/issues/4. Basically, because turbolinks does not always reload the data in the document head when a page changes, there are times when new gon...