Categories: None [Edit]
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: 156,494 of 180,530
Downloads: 2,857
Daily
Ranking: 95,592 of 180,517
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Owners
# | Gravatar | Handle |
---|---|---|
1 | kirkbowers |