material_raingular 0.5.2 → 0.5.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6506567f3b69bc2a7c04e433427709025d541cb7
|
|
4
|
+
data.tar.gz: 2d3b5e0b2b42ea631de6d44328709b15153ed112
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0367a9a2ca9fdb7bd6e5255a06d43fb55938e43fee713ba721539e8f0e3ec41610e8a16b599cfa6c4cf564afd5f3fb2889d94c7de24d29631c49df7019c63ce0
|
|
7
|
+
data.tar.gz: fd955eeb2960a25d3b1e2bc28a560726268808e65dc8f1337c6d9143779434e8b581f03a3dd394465d7b32d0cfd768bada86ab965a84b52be387b6eb110a5ade
|
|
@@ -41,7 +41,8 @@ class ActiveRecord.Controller extends AngularServiceModel
|
|
|
41
41
|
restful: ['new','create','index','edit','update','show','destroy']
|
|
42
42
|
$buildUrls: ->
|
|
43
43
|
@_urls ||= {}
|
|
44
|
-
|
|
44
|
+
parents = if (typeof @parents == 'function') then @parents() else @parents
|
|
45
|
+
for item in [parents].compact().flatten()
|
|
45
46
|
atom = if typeof item == 'string' then item else Object.keys(item)[0]
|
|
46
47
|
foreignKey = item[atom]?.foreignKey || atom + '_id'
|
|
47
48
|
@_urls[foreignKey] ||= {}
|
|
@@ -75,9 +76,9 @@ class ActiveRecord.Controller extends AngularServiceModel
|
|
|
75
76
|
Desired Syntax
|
|
76
77
|
class ActiveRecord.Project extends ActiveRecord.Base
|
|
77
78
|
@register(angular.app)
|
|
78
|
-
|
|
79
|
+
parents: [{company: {shallow: true}},{person: {only: ['index']},'organization'] # Non-Shallow routes index,create,new Shallow routes update,edit,show,destroy
|
|
79
80
|
# Alternate function snytax:
|
|
80
|
-
|
|
81
|
+
parents: ->[{company: {shallow: true}},{person: {only: ['index']},'organization']
|
|
81
82
|
|
|
82
83
|
resulting functionality
|
|
83
84
|
# New
|
|
@@ -119,8 +120,8 @@ resulting functionality
|
|
|
119
120
|
Desired Syntax
|
|
120
121
|
class ActiveRecord.Project extends ActiveRecord.Base
|
|
121
122
|
@register(angular.app)
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
__url__: -> '/not_projects'
|
|
124
|
+
parents: [{company: {shallow: true}}]
|
|
124
125
|
|
|
125
126
|
resulting functionality
|
|
126
127
|
# New
|
|
@@ -148,8 +149,8 @@ resulting functionality
|
|
|
148
149
|
Desired Syntax
|
|
149
150
|
class ActiveRecord.Project extends ActiveRecord.Base
|
|
150
151
|
@register(angular.app)
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
__url__: -> '/not_projects'
|
|
153
|
+
parents: [{company: {shallow: true, url: '/not_companies/:id/something'}}]
|
|
153
154
|
|
|
154
155
|
resulting functionality
|
|
155
156
|
# New
|
|
@@ -32,12 +32,12 @@ class ActiveRecord.$Resource extends Module
|
|
|
32
32
|
_defaultWrap: -> @_options.klass.underscore()
|
|
33
33
|
_defaultPath: -> '/' + @_options.klass.tableize() + '/:id'
|
|
34
34
|
$updateUrl: ->
|
|
35
|
-
path = @_options.
|
|
35
|
+
path = @_options.update_url || @_defaultPath()
|
|
36
36
|
path = path.replace(':id', @.id || '').replace(/\/$/,'')
|
|
37
37
|
path += '.json' unless path.match(/\.json$/)
|
|
38
38
|
path
|
|
39
39
|
$destroyUrl: ->
|
|
40
|
-
path = @_options.
|
|
40
|
+
path = @_options.destroy_url || @_defaultPath()
|
|
41
41
|
path = path.replace(':id', @.id)
|
|
42
42
|
path += '.json' unless path.match(/\.json$/)
|
|
43
43
|
path
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: material_raingular
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Moody
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-02-
|
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|