serialized_virtual_attributes 0.1.2 → 0.1.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ac42c610189c0b3fcc773421547d6e5cbcb097f
|
|
4
|
+
data.tar.gz: 4301c7df6ffb65eacf93c5131b84adae31d904cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f67ddf82fb8bb8e9fe3bf1121619a6190a1f5a9723481c123f3ed433ba0871b3f15a5d44d520073cba89440cfd949c73dc11f04fca1585d782f889a7944f053c
|
|
7
|
+
data.tar.gz: 342357585c57ee983d9b6cf8f75e1be30e080f74ea7150dd7cde857175765475d71ff674b537ee462801564c017f56eb8055c79d49c5e6d1860c9fad34c78e9c
|
|
@@ -12,7 +12,7 @@ module SerializedVirtualAttributes
|
|
|
12
12
|
def serialized_virtual_attribute(*args)
|
|
13
13
|
options = args.extract_options!
|
|
14
14
|
to = options[:to]
|
|
15
|
-
return unless self.
|
|
15
|
+
return unless self.column_names.include?(to.to_s)
|
|
16
16
|
|
|
17
17
|
raise ArgumentError.new("option 'to' not provided or it is not serialized to hash") if to.blank? or self.serialized_attributes[to.to_s].try(:object_class) != Hash
|
|
18
18
|
|