model_updates 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/model_updates/model_extensions.rb +14 -0
- data/lib/model_updates/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55cad4d123a29cc4f099ce8b0072fe692d783298
|
4
|
+
data.tar.gz: 04a73706c8ef3f66440ab0ebff2683b702f4d26b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71bd72da83c44936f8475851356045d20ff0cc2ba26c893c14278e0163ebdabd23b4397e702481310b3809cfd2fc3052a9b39fa872541485590494c015b2f601
|
7
|
+
data.tar.gz: 03b5e3e89ef4ef141205cd5552e081e4285842a91a89d36cb75d3712f43e3b8b4ef993333470ae0592168498630e61905434be75937b102f0e78cc4b3cd0d3f5
|
@@ -31,6 +31,20 @@ module ModelUpdates::ModelExtensions
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
def model_updates_attrs(key, more = {})
|
35
|
+
attrs = {
|
36
|
+
model_updates_id: id,
|
37
|
+
model_updates_model: self.class.name,
|
38
|
+
model_updates_key: key
|
39
|
+
}
|
40
|
+
|
41
|
+
more.each do |hash_key, hash_value|
|
42
|
+
attrs["model_updates_#{hash_key}"] = hash_value
|
43
|
+
end
|
44
|
+
|
45
|
+
attrs
|
46
|
+
end
|
47
|
+
|
34
48
|
def model_updates_data_attrs(key, more = {})
|
35
49
|
{
|
36
50
|
id: id,
|