hstorly 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/hstorly/active_record_extensions.rb +3 -1
- data/lib/hstorly/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: dcca16b1add0b062644a31d3c58c7a8355e01e65
|
4
|
+
data.tar.gz: a2b5960e0f99c97fa69bfc1f307b0acc093fdbed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31dceccdeb55530dd4e0715ba772516ed9ad3454e3d60d6799344a71eb476f2b77fb07faaf1307c40f6080c0e87dea4b143ffcf690cb202791a53058607644bd
|
7
|
+
data.tar.gz: 2413adf12f8784b98507b1c14f34d855563be61f9e1747c52b8143ef6c197a33b245e404cac89c4e2902e5c8c31e2b84dc6153da43acb05172d4052837b034b2
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Hstorly
|
2
2
|
|
3
|
-
[](https://travis-ci.org/hendricius/hstorly)
|
4
4
|
|
5
5
|
This project is a fork of the amazing [bithavoc/multilang-hstore](https://github.com/bithavoc/multilang-hstore) with some remarkable differences.
|
6
6
|
|
@@ -19,7 +19,9 @@ module Hstorly
|
|
19
19
|
#
|
20
20
|
# returns the new value
|
21
21
|
define_method "#{attribute}=" do |value|
|
22
|
-
if
|
22
|
+
if value.is_a?(Hash)
|
23
|
+
write_attribute attribute, value
|
24
|
+
elsif self[attribute].present?
|
23
25
|
write_attribute attribute, send(attribute).merge({I18n.locale => value })
|
24
26
|
value
|
25
27
|
else
|
data/lib/hstorly/version.rb
CHANGED