We're hiring!

We're actively seeking developers and designers for our Ann Arbor & Detroit locations.

Rails Routes in Javascript with js-routes

One thing that has annoyed me historically is hitting our Rails routes from Javascript. I’ve either sent the route down with other JSON data or simply typed the right string into the Javascript code. Both solutions work but I was never wild about them. Now we’ve been using the js-routes library for a couple of months and it’s been working great. It’s easy to use: access the documents resource with the Javascript function Routes.documents_path(). It takes parameters just like the Rails routes helpers.

Thank you to Bogdan Gusiev and the other contributors of the js-routes library.

Matt Fletcher (74 Posts)

Matt is a software practitioner with Atomic Object.

This entry was posted in Web Apps and tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.