nullify_empty 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/nullify_empty/active_record_extension.rb +2 -0
- data/lib/nullify_empty/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: b1cd0566cb64431a07fc94a4040fbf936ccc6dad
|
4
|
+
data.tar.gz: 6db5506decdafe3eff4a44fb792b50ab37838336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f0cf076c473576bc9d8ea86de3795d202a4dedbebc1979ad4ada9f655e1e6e825379c4391dce3015e25a71646bb78c9783bd9bd1aa4c822b3b3534ff25b46b8
|
7
|
+
data.tar.gz: 3c3600588a6c07b05aa7c5674eb2d59551e6ba59bbf069e188e9bea6125e5e29d43cb6cdb83f478d1ae00433680c6a79eea6590ffc499ad63087d5063b287c9f
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# NullifyEmpty
|
2
2
|
|
3
|
-
This gem allows to store string or text attributes as NULL in DB
|
3
|
+
This gem allows to store string or text Rails model attributes as NULL in DB when they have empty values.
|
4
4
|
It is very useful when you need to avoid `""` values coming from blank form inputs or anywhere else to be stored in DB.
|
5
5
|
|
6
6
|
Having empty values in DB is not allowed when there is unique constraint on the column or uniqueness validation on the field, while presence of the values is not required. Unique constraint ignores nulls in most DBMS.
|
@@ -51,7 +51,7 @@ user.email # => nil
|
|
51
51
|
|
52
52
|
## Contributing
|
53
53
|
|
54
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
54
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/chumakoff/nullify_empty. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
55
55
|
|
56
56
|
## License
|
57
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nullify_empty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Chumakov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|