js_routes 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in js_routes.gemspec
4
4
  gemspec
5
+
6
+ gem "rake"
@@ -30,6 +30,10 @@ module JsRoutes
30
30
  File.open(filename, 'w') do |f|
31
31
  f << 'window.Routes = {};'
32
32
  Rails.application.routes.routes.each do |route|
33
+ defaults = route.defaults
34
+
35
+ continue if defaults.present? && defaults.has?(:exclude_from_js)
36
+
33
37
  f << <<-JS.strip
34
38
  Routes.#{route.name}_path = function() {
35
39
  Array.prototype.unshift.call(arguments, '#{route.path}');
@@ -1,3 +1,3 @@
1
1
  module JsRoutes
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-12 00:00:00.000000000 +04:00
12
+ date: 2011-07-28 00:00:00.000000000 +04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: ''