material_raingular 0.6.3 → 0.6.4

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: 12064f5841329d33f5998822cacc5f20f7b83a4f
4
- data.tar.gz: d3949ce53e803cb3ee70b90f221f45aab00b07e0
3
+ metadata.gz: dc58e6497a149483a3d49af5b67aab60bcbb2d67
4
+ data.tar.gz: 5b5d9798684d6de83a2954fb0bd2f5f3732184dc
5
5
  SHA512:
6
- metadata.gz: e8633b067a478cfcf244d1d2d4029dbfe62e59a0818fe43c1b256445fe6ff424ba9a47af172c595d62559c57dc8b6da972b847be5117dae4435d58120594b878
7
- data.tar.gz: b47934e0045feb7fab7566fda3e9b89f794d54292bfb3184713f4d931fa16b6e88c91a5be1103696922880e5eb2f5ff0d3590bbfdcb7063e2cb95949fc0d0c2c
6
+ metadata.gz: c8a8b65c5ea32feda5597becd364657ff84c8d11cf7480fdf137a91769c62b3aa650ee0209d37106405a501f77ac7b108cad7f3806b9afa10f4cc7a9fed49327
7
+ data.tar.gz: bd2110b7cd94edc52afa8c7abc4e256af20820a99452b460a01d413fce3d50f22a82483e8e40343b604c2f81fce0ed9bd6449b6cc3f0d5b6b9229232e342e3bd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- material_raingular (0.6.3)
4
+ material_raingular (0.6.4)
5
5
  js-routes
6
6
 
7
7
  GEM
@@ -50,11 +50,14 @@ class ActiveRecord.$Resource extends Module
50
50
  @$promise = @_save.bind(@)().then(callback,error)
51
51
  return @$promise
52
52
  _save: ->
53
- res = @$paramSerializer.update(@)
54
- unless Object.keys(res).length > 0
55
- defer = @$q.defer()
56
- defer.resolve(@)
57
- return defer.promise
53
+ if @id
54
+ res = @$paramSerializer.update(@)
55
+ unless Object.keys(res).length > 0
56
+ defer = @$q.defer()
57
+ defer.resolve(@)
58
+ return defer.promise
59
+ else
60
+ res = @$paramSerializer.create(@)
58
61
  @$updatingKeys = Object.keys(res)
59
62
  method = if @.id then 'put' else 'post'
60
63
  params = {}
@@ -15,7 +15,7 @@ class @MaterialModalModel extends AngularScopedModel
15
15
  @[key] = args[index]
16
16
  for key in @constructor.$locals || []
17
17
  @$scope[key] = @[key]
18
- @$scope.hide = @$scope.cancel = @$scope.close = @$mdDialog.hide
18
+ @$scope[key] = @$mdDialog.hide for key in ['hide','cancel','close']
19
19
 
20
20
  # Bind all functions not begining with _ to scope
21
21
  for key, val of @constructor.prototype
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
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.6.3
4
+ version: 0.6.4
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-08-01 00:00:00.000000000 Z
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler