ocean-dynamo 0.1.11 → 0.1.12

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: 2715c40f4987fe7ffe19eecd488bc67b5a9cebb3
4
- data.tar.gz: 8fdae13f4f5d71632a0c938588e977807a53ec61
3
+ metadata.gz: 57c8794d00ec0fee8e6c820e773072449d3c6fa8
4
+ data.tar.gz: 0626caa9717aeccd8d927b6e586a5915b5fd6316
5
5
  SHA512:
6
- metadata.gz: b400e19b2a3b2707adfea3e415fe672352fe0e30267992ce14e70b616a7bce0ee1a569396278e0fe675ec2f4a7a4db65e4e7fd922ecd6d5112d7ce4aa5eff240
7
- data.tar.gz: a0cc3aa3eb5866d64db1407267e5c9ac63606452eaeda01eb766f24888d6546b33768b80bcb3df6ccf8851f45876106a660026dee48ef7df6e3cd3b151c54610
6
+ metadata.gz: ab7dfe59f45ef9effbb70f4fd9d918578f949f8996eac431197960aa74fd6bdc40d7f16cf0aaca72066c19ebc712d78e01b1ffeb75b39a74637e0920b2cdc02d
7
+ data.tar.gz: bea89734ed3538b7e00e9d82deef3670f56a92dfb7dabec85022a419d658a98e377a1c392478a6b41047a205218de75b9d80c8dbeabf174fa18424779bee8fd4
@@ -60,28 +60,36 @@ module OceanDynamo
60
60
  end
61
61
 
62
62
 
63
- def save
64
- begin
65
- create_or_update
66
- rescue RecordInvalid
63
+ def save(options={})
64
+ if perform_validations(options)
65
+ begin
66
+ create_or_update
67
+ rescue RecordInvalid
68
+ false
69
+ end
70
+ else
67
71
  false
68
72
  end
69
73
  end
70
74
 
71
75
 
72
- def save!(*)
73
- create_or_update || raise(RecordNotSaved)
76
+ def save!(options={})
77
+ if perform_validations(options)
78
+ create_or_update || raise(RecordNotSaved)
79
+ else
80
+ raise RecordInvalid
81
+ end
74
82
  end
75
83
 
76
84
 
77
- def update_attributes(attributes={})
78
- assign_attributes(attributes)
85
+ def update_attributes(attrs={})
86
+ assign_attributes(attrs)
79
87
  save
80
88
  end
81
89
 
82
90
 
83
- def update_attributes!(attributes={})
84
- assign_attributes(attributes)
91
+ def update_attributes!(attrs={})
92
+ assign_attributes(attrs)
85
93
  save!
86
94
  end
87
95
 
@@ -1,3 +1,3 @@
1
1
  module OceanDynamo
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson