js_routes 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,16 +32,16 @@ module JsRoutes
32
32
  Rails.application.routes.routes.each do |route|
33
33
  defaults = route.defaults
34
34
 
35
- continue if defaults.present? && defaults.has?(:exclude_from_js)
36
-
37
- f << <<-JS.strip
38
- Routes.#{route.name}_path = function() {
39
- Array.prototype.unshift.call(arguments, '#{route.path}');
40
- return $.buildPath.apply($, arguments);
41
- };
42
- JS
35
+ unless defaults.present? && defaults.has?(:exclude_from_js) && defaults[:exclude_from_js]
36
+ f << <<-JS.strip
37
+ Routes.#{route.name}_path = function() {
38
+ Array.prototype.unshift.call(arguments, '#{route.path}');
39
+ return $.buildPath.apply($, arguments);
40
+ };
41
+ JS
42
+ end
43
43
  end
44
44
  end
45
45
  end
46
46
 
47
- end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module JsRoutes
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
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.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: