activerecord_hstore_boolean 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/activerecord_hstore_boolean.gemspec +1 -1
- data/lib/activerecord_hstore_boolean.rb +2 -2
- data/lib/activerecord_hstore_boolean/version.rb +1 -1
- 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: bf660dfc76f1a6ae5768c488557f400c823283f2
|
4
|
+
data.tar.gz: ab6b61d71179b284bcaf0a89d461c047c14044de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fa9f31fddb813aa53c81bf408684134e59419a12bb67b78b5f805271da4c7be16fd8c3ee076a6f38eb86f7b621ffd076f807f3e8f6a063bd40db011f1e63fb3
|
7
|
+
data.tar.gz: 5ed4c494eb215e23547e9f0519fd9f0264f614727d749be18db29f08de81fc62f8f3090233ac2f791d9d3ba9b3c81eb54347d82da6912e6cbca22b48cb4d3872
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ TRUE_VALUES = [true, 1, '1', 't', 'T', 'y', 'Y', 'yes', 'YES', 'true', 'TRUE']
|
|
42
42
|
|
43
43
|
## Contributing
|
44
44
|
|
45
|
-
1. Fork it ( http://github.com
|
45
|
+
1. Fork it ( http://github.com/yesmeck/activerecord_hstore_boolean/fork )
|
46
46
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
47
47
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
48
48
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['yesmeck@gmail.com']
|
11
11
|
spec.summary = %q{Store boolean in hstore}
|
12
12
|
spec.description = %q{A activerecord extesion allow you use boolean in hstore}
|
13
|
-
spec.homepage = ''
|
13
|
+
spec.homepage = 'https://github.com/yesmeck/activerecord_hstore_boolean'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -10,9 +10,9 @@ module ActiverecordHstoreBoolean
|
|
10
10
|
module ClassMethods
|
11
11
|
def hstore_boolean_values(attr_name, *keys)
|
12
12
|
keys.map!(&:to_sym)
|
13
|
-
before_save "normalize_#{attr_name}
|
13
|
+
before_save "normalize_#{attr_name}_boolean_values"
|
14
14
|
|
15
|
-
define_method("normalize_#{attr_name}
|
15
|
+
define_method("normalize_#{attr_name}_boolean_values") do
|
16
16
|
self[attr_name].to_options!.each do |key, value|
|
17
17
|
self[attr_name][key] = TRUE_VALUES.include?(value) ? STORED_TRUE_VALUE : STORED_FALSE_VALUE if keys.include?(key)
|
18
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_hstore_boolean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meck
|
@@ -112,7 +112,7 @@ files:
|
|
112
112
|
- lib/activerecord_hstore_boolean/version.rb
|
113
113
|
- spec/activerecord_hstore_boolean_spec.rb
|
114
114
|
- spec/spec_helper.rb
|
115
|
-
homepage:
|
115
|
+
homepage: https://github.com/yesmeck/activerecord_hstore_boolean
|
116
116
|
licenses:
|
117
117
|
- MIT
|
118
118
|
metadata: {}
|