gazay/gon
Your Rails variables in your JS observed · 2026-08-28
Health v2 · maintenance only
91/100
- Activity 99
- Release rhythm 76
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 87
- age_days: 5595
- days_rel: 83
- days_push: 10
- n_releases_24m: 4
Adoption not part of the score
3101 stars · 185 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Gon is a Ruby gem for Rails that lets you pass server-side variables from controllers directly into your JavaScript with a single layout tag. It supports Jbuilder and Rabl templates and offers gon.watch for refreshing variables via AJAX.
Use cases
- pass Rails controller data to JavaScript without inline scripts
- share server-side variables with frontend JS files
- renew data in JS variables through AJAX with gon.watch
- serialize controller data using Jbuilder or Rabl templates
- avoid parsing data attributes in JavaScript
When to choose
- you maintain a Rails app and need to hand server data to client-side JS
- you want a simple, battle-tested way to expose variables in the layout
- you need periodic data refreshes in JS via gon.watch
When to avoid
- you build SPAs with a JSON API and a separate frontend framework
- your stack is not Ruby/Rails (use the ports for Sinatra, .NET, or Phoenix instead)
- you only need static assets or no server-to-client data passing
Facets
library · maturity maintenance
templating serialization web-framework web-development backend frontend ruby rails ruby-gem server-to-client-data jbuilder rabl sinatra web-server
1 source
- readme: https://github.com/gazay/gon · fetched 2026-08-28 · b103d299f4ea
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| gazay/gon | main | 91 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem