
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Access your Rails named routes from coffeescript. Read about the making of here.
Add this line to your application's Gemfile:
gem 'coffee_routes'
And then execute:
$ bundle
Or install it yourself as:
$ gem install coffee_routes
Include coffee_routes in your application.coffeee
#= require coffee_routes
You should now have the CoffeeRoutes object in your global javascript scope.
To access a named route, you can use the CoffeeRoute.path helper directly or you can use the global _path helper that is attached to window that you can call just like you would when writing a rails view.
CoffeeRoutes.path('project_item')
=> "/projects/:project_id/item/:id"
project_item_path()
=> "/projects/:project_id/item/:id"
To substitute in the parameter values pass in a hash.
CoffeeRoutes.path('project_item', {"project_id" : "project-awesome", "id" : 5})
=> "/projects/project-awesome/items/5"
project_item_path({"project_id" : "project-awesome", "id" : 5})
=> "/projects/project-awesome/items/5"
You can also get the HTTP verb that should be used with the named route.
CoffeeRoutes.method('project_item')
=> "GET"
FAQs
Unknown package
We found that coffee_routes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.