serialized_virtual_attributes 0.1.1 → 0.1.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/README.md +1 -1
- data/lib/serialized_virtual_attributes/version.rb +1 -1
- data/lib/serialized_virtual_attributes.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cecd1e3b85adda0ba6cfbf3e7b1b9fb5ed948156
|
|
4
|
+
data.tar.gz: 9765ca68bf0c3306838e9123aee7a6de00abca21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df4d73d9925b5449e28ba955eaa8b913db84ead7ddb593272891310282a957aee352de6441edfe60bbe9b3a8e9a0f44bb1f6f7caa2a1459668c3bd6b6ee96fb7
|
|
7
|
+
data.tar.gz: 4858d1dac626a9bcb0e7b4cdebb951b0039d85183d9e86bd7422428e3bae23f6dbc62d4e09b689c28d7bf25ad7ba212043d597e2d78c77df7f13f7e06d3ee8b0
|
data/README.md
CHANGED
|
@@ -58,7 +58,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
58
58
|
|
|
59
59
|
## Contributing
|
|
60
60
|
|
|
61
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/flant/serialized_virtual_attributes.
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
## License
|
|
@@ -12,6 +12,8 @@ module SerializedVirtualAttributes
|
|
|
12
12
|
def serialized_virtual_attribute(*args)
|
|
13
13
|
options = args.extract_options!
|
|
14
14
|
to = options[:to]
|
|
15
|
+
return unless self.columns_names.include?(to.to_s)
|
|
16
|
+
|
|
15
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
|
|
16
18
|
|
|
17
19
|
typecast = options[:typecast]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: serialized_virtual_attributes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey.Gnuskov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|