js-namespace-rails 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afc31bbe52d154ba9147040e7fcaaa6482ee30bc
|
4
|
+
data.tar.gz: d9eef4c54e60ba656f13849e35c4e639ed8f0af1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 755f35e0962a061ae08eca6b1b06d01a4eaa73f2782780b6d58791df6ab9475c3b794c267e8763366a5ad0946dd0ee5832f00ca9a8d26b5b7838c2064962a06d
|
7
|
+
data.tar.gz: 1fdd49ba2e14fab4deb51587be2d7cc2d121671bb10f41f039a8db68ad7caba24cb930432f50f37043a43858e2ba008b8b04b83d822cf9dc1a167cdd86f9c75c
|
@@ -7,9 +7,9 @@ module ActionView::Helpers::AssetTagHelper
|
|
7
7
|
|
8
8
|
origin_result = javascript_include_tag_without_controller(*source)
|
9
9
|
|
10
|
-
if defined?(controller_path)
|
10
|
+
if defined?(controller_path) && !@_included
|
11
11
|
_controller = controller_path.gsub(/\//,'_')
|
12
|
-
|
12
|
+
@_included = true
|
13
13
|
script = <<STRING
|
14
14
|
document.addEventListener('DOMContentLoaded', function() {
|
15
15
|
document.getElementsByTagName('body')[0].setAttribute('data-controller', '#{_controller}');
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js-namespace-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Hou
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|