nali 0.3.4 → 0.3.5
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.
- data/lib/client/javascripts/nali/view.js.coffee +7 -8
- data/lib/nali/version.rb +1 -1
- metadata +2 -2
@@ -93,9 +93,11 @@ Nali.extend View:
|
|
93
93
|
[ chain, segments... ] = match[2].split '/'
|
94
94
|
if result = @analizeChain chain, ( if match[1].length is 1 then @ else @model )
|
95
95
|
[ source, method ] = result
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
if method of source
|
97
|
+
args = @parseUrlSegments segments
|
98
|
+
args.unshift params if params
|
99
|
+
source[ method ] args...
|
100
|
+
else console.warn "Method %s not exists of %O", method, source
|
99
101
|
else @redirect url, params
|
100
102
|
@
|
101
103
|
|
@@ -302,8 +304,5 @@ Nali.extend View:
|
|
302
304
|
analizeChain: ( chain, source = @model ) ->
|
303
305
|
segments = chain.split '.'
|
304
306
|
property = segments.pop()
|
305
|
-
source = @getSource segments, source
|
306
|
-
|
307
|
-
else
|
308
|
-
console.warn "Property \"%s\" not exists in %O", property, source
|
309
|
-
null
|
307
|
+
return null unless source = @getSource segments, source
|
308
|
+
[ source, property ]
|
data/lib/nali/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nali
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
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: 2014-12-
|
12
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thin
|