Categories: None [Edit]

js-rails-routes

https://rubygems.org/gems/js-rails-routes
https://github.com/kirkbowers/js-rails-routes
+js-rails-routes+ is a utility for generating JavaScript equivalents to the +<route>_path+ functions provided by {Ruby on Rails}[https://github.com/rails/rails]. This allows you to do very similar things in your {+ejs+}[https://rubygems.org/gems/ejs/] JavaScript templates as you would in your +erb+ ruby templates. You can move html rendering to the client and keep it looking very similar to how it would look on the server. For example, if you have a model +Item+ and a simple route to list all the items, a link to that items page (using an explicit +a+ anchor tag instead of the Rails +link_to+) would look the same in either an +erb+ file or an +ejs+ file: <a href="<%= items_path() %>">List all Items</a> This gem was originally developed as part of the {MVCoffee}[http://mvcoffee.org] suite of tools, and integrates strongly with the {mvcoffee.js}[https://github.com/kirkbowers/mvcoffee] CoffeeScript MVC framework.

Total

Ranking: 162,060 of 192,239
Downloads: 3,262

Daily

Ranking: 120,604 of 192,213
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
166296,150,426rdoc
2,3499,234,619hoe

Owners

#GravatarHandle
1iconkirkbowers