js-namespace-rails 1.0.2 → 1.1.0

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: e856175ef86aae61fe8652a9eab0eca6ea5b8be2
4
- data.tar.gz: 2b3898475d0ab5ee4151ca442841fe8014e553da
3
+ metadata.gz: 11925db934f9f28cd634224f0580634eb37d8785
4
+ data.tar.gz: 790e3fe273ad9fd2720fa31b564520ec75de0aae
5
5
  SHA512:
6
- metadata.gz: d8ad6b85b9ee92e81b4e0fce12b8599fc7c90a36ed6eb63deab9ff8fea754228a95dc954550732cba7512cf626620cf5a711e1eca35cd6ca4c8c81157a77e442
7
- data.tar.gz: 73dcd9281f30f4c9c540127ea01216f751a942ad2c9b886f7f85d7930fea02423b8f7f2adfa8566f2f6f7f31c78267d0d3a3822f08c4d93ec0456e4c6434bb84
6
+ metadata.gz: f7355c772d2e9f4ab1cb57395231aac6eb2efe65e90ee9cd5e9bd986143abc1071798784344c18b3ca619738d320140fdfedce25dea5224605fab3a650bdd302
7
+ data.tar.gz: bcf9d3c7e49341b2a816e68d2ed2acd7faaf9e6f09badf536be7d1855a002eccbfa18e64ad5d9b147acc0ad2140de9b4321a6d2a8265f6010cb288a79d8aa685
@@ -9,6 +9,8 @@
9
9
 
10
10
  self.INIT = 'init';
11
11
 
12
+ self.RESERVE = ['new'];
13
+
12
14
  self.controllerList = {};
13
15
 
14
16
  self.on = function(controllerName, obj){
@@ -37,6 +39,8 @@
37
39
 
38
40
  if(activeController[actionName] !== undefined && typeof activeController[actionName] === 'function'){
39
41
  activeController[actionName].call(activeController, params);
42
+ } else if ( self.RESERVE.indexOf(actionName) >= 0 && activeController['_' + actionName] !== undefined) {
43
+ activeController['_' + actionName].call(activeController, params);
40
44
  }
41
45
  }
42
46
  };
@@ -1,3 +1,3 @@
1
1
  module JsNamespaceRails
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
3
3
  end
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: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Hou
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-19 00:00:00.000000000 Z
11
+ date: 2017-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties