mtrpcic / js-routes Goto Github PK
View Code? Open in Web Editor NEWYour Rails routes on the client side.
Your Rails routes on the client side.
I tweaked the script to work with rails 3.1 by making the following changes:
changed instances of RAILS_ROOT to Rails.root
and save_path now equals "#{Rails.root}/app/assets/javascripts/#{filename}" for the new assets feature
My version of rails is 3.2.13
When i run rake js:routes, i get the following error:
rake aborted!
undefined method `split' for #<Journey::Path::Pattern:0x000000077b8a20>
/home/hsps/crm-sages/lib/tasks/js.rake:63:in `block in generate_routes_for_rails_3'
/home/hsps/crm-sages/lib/tasks/js.rake:61:in `generate_routes_for_rails_3'
/home/hsps/crm-sages/lib/tasks/js.rake:8:in `block (2 levels) in <top (required)>'
Tasks: TOP => js:routes
(See full trace by running task with --trace)
I fixed this issue by changing
route.path.split("(")[0]
to
route.path.spec.to_s.split("(")[0]}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.