super_serialize 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/lib/super_serialize/version.rb +1 -1
- data/lib/super_serialize.rb +6 -5
- 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: 5cfab41d4f18883cf401e36df31939fcfabad8f7
|
4
|
+
data.tar.gz: fca731a736d030d200164fe7a5e216286e3b9938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 299935519135ba351a1e46856d4d35b3ee7a0dc11a62e367bec77f789b6405b803170b512039b8c4bdc5cae0b71ef49a893c0d14aca5be45b94f2abbe2af803b
|
7
|
+
data.tar.gz: 18a26308095e10619bf9cda6e91143694a136c5b9c16ce4d92b2e6eb139f5ca146359b6ca1cecf9f8a99f4bb8cbe619542756a714127a9b1390941fdaf117385
|
data/lib/super_serialize.rb
CHANGED
@@ -2,11 +2,6 @@ module SuperSerialize
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
4
|
included do
|
5
|
-
# Validations for super serialized columns
|
6
|
-
validate :check_if_super_serialized_attributes_are_valid_yaml
|
7
|
-
|
8
|
-
# Callback to yamlize super serialized columngs just prior to saving to the database
|
9
|
-
before_save :yamlize_super_serialized_attributes
|
10
5
|
end
|
11
6
|
|
12
7
|
module ClassMethods
|
@@ -110,6 +105,12 @@ module SuperSerialize
|
|
110
105
|
end
|
111
106
|
|
112
107
|
class_eval do
|
108
|
+
# Validations for super serialized columns
|
109
|
+
validate :check_if_super_serialized_attributes_are_valid_yaml
|
110
|
+
|
111
|
+
# Callback to yamlize super serialized columngs just prior to saving to the database
|
112
|
+
before_save :yamlize_super_serialized_attributes
|
113
|
+
|
113
114
|
unless const_defined?('SUPER_SERIALIZED_ATTRIBUTES')
|
114
115
|
const_set('SUPER_SERIALIZED_ATTRIBUTES', attr_names)
|
115
116
|
end
|