activeupdate 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activeupdate.rb +2 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12be84f7fe34db02cfefc508d0f9878548e62dbf
|
4
|
+
data.tar.gz: 11ce00996b963e365797df1ba0af6cb0c4ac672f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 398b69c0a128312639e62a025af9e91423591d01c2b1bf6d5d9551b5700d748453698721c0fdd3f57c2b1fc3a250585e7d9311c532a63a878751355655d9eb82
|
7
|
+
data.tar.gz: edd12172fc6a76a7abbf4e9be88857606b5588d4a35ec05af9448c31140b07c19b8b77e83acbbe1c8f08535205becde6910df3dfd4fd4c173cb4e42e816d733e
|
data/lib/activeupdate.rb
CHANGED
@@ -19,11 +19,8 @@ module ActiveRecordExtension
|
|
19
19
|
|
20
20
|
attributes.each_with_index do |attribute, index|
|
21
21
|
attribute.each do |key, value|
|
22
|
-
|
23
|
-
|
24
|
-
else
|
25
|
-
attribute_hash[key] = Arel::Nodes::Case.new(resources_id).when(ids[index]).then(value)
|
26
|
-
end
|
22
|
+
attribute_hash[key] = Arel::Nodes::Case.new(resources_id) unless attribute_hash[key]
|
23
|
+
attribute_hash[key].when(ids[index]).then(value)
|
27
24
|
end
|
28
25
|
end
|
29
26
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeupdate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew H. Carpenter
|
@@ -40,6 +40,6 @@ rubyforge_project:
|
|
40
40
|
rubygems_version: 2.5.1
|
41
41
|
signing_key:
|
42
42
|
specification_version: 4
|
43
|
-
summary: activerecord extension to facilitate updating multiple records
|
44
|
-
|
43
|
+
summary: activerecord extension to facilitate updating multiple records (leveraging
|
44
|
+
case statements)
|
45
45
|
test_files: []
|