activeupdate 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/activeupdate.rb +4 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a840c7532ea6d2e79ec7d1c2ffa11887b9fe2676
4
- data.tar.gz: cc6fa23a2a04e6383bca705e7e4c37c0a8cfea12
3
+ metadata.gz: 6be1c8a896db720ca9beb661319327cfd0cc99b6
4
+ data.tar.gz: f05533ea6f94fc0fda92b06ca6feae84f2ee06ee
5
5
  SHA512:
6
- metadata.gz: 589d47fea630518cf865aa90e130619da8ebd2a41f375cfdd842c3b871e5b04dda67cc1c21a59b4e1ea12b1994cf72ce21ef49a71e61e64440457f936766cb96
7
- data.tar.gz: 0f22a99bb37b1d3db83edc5e1d31812c4b76bbfd11f55c3de719df3fdabe0a49d143fa0eb4961ee198f6e387597631af9ac57fd59bb538556a5bc8a9af51c3ad
6
+ metadata.gz: 7b7427b1ebbb3dad9161cce9da815b87a5a1a535f420651ae2c09b8ea689d55ab94d2683f74d7a1ea25f677730a95ad1c285ee3ca67d68ad42b7c1f5636c7a43
7
+ data.tar.gz: 0b450a06665cf9d5c6f6e2796bd3b579a76d9a9297002b4df79b608e10652e3a2b8c5108a0a211a9fd87da97106bbd2e6be731a94c5509c36c4c0744c858b728
data/lib/activeupdate.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  module ActiveRecordExtension
2
-
3
2
  extend ActiveSupport::Concern
4
3
 
5
- # add your static(class) methods here
6
4
  module ClassMethods
7
5
 
6
+ # Updates an object (or multiple objects) and saves it to the database. The resulting object is returned whether the object was saved successfully to the database or not.
7
+ #
8
+ # @param resources_hash [Hash], a hash of resources, { '0' => { 'id' => 1, 'attribute' => 'test' }, '1' => { 'id' => 2, 'attribute' => 'cheese' } }
9
+ # @return [Object], the object.
8
10
  def update!(resources_hash = nil)
9
11
  return self unless resources_hash
10
12
 
@@ -46,5 +48,4 @@ module ActiveRecordExtension
46
48
  end
47
49
  end
48
50
 
49
- # include the extension
50
51
  ActiveRecord::Base.send(:include, ActiveRecordExtension)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeupdate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew H. Carpenter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: drewwcarpenter@gmail.com