mongoid_enumerable 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -0
- data/lib/mongoid_enumerable.rb +1 -3
- data/lib/mongoid_enumerable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2297bea78c60f9cab28d878252f29a80752d7a29b708ba9e11b3ac6d5a3cefca
|
4
|
+
data.tar.gz: 619b26c22a62e2acbd6f84ad2623d62a7494048958c57ef9c01853e5526af274
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da92a24350c59ee86e9c6f5035b45e640b0e8207e64c4fe93f0491edf3383c3ff68bde374cea0881567caacfa3ba724290357c35f756c6e20975368db52f62f2
|
7
|
+
data.tar.gz: 98a2761a3feaf2d62d8143327b935991e576457f764202daec1c907b6f35d622bb5411f181ffa4198a99f0b171ef748132a7adfb9b221e9bed6364fbf24d9170
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -95,3 +95,10 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
95
95
|
## Contributing
|
96
96
|
|
97
97
|
Bug reports and pull requests are welcome on GitHub at https://github.com/douglaslise/mongoid_enumerable.
|
98
|
+
|
99
|
+
## Releasing a New Version
|
100
|
+
After change version in file `lib/mongoid_enumerable/version.rb` it is needed only to run this command in terminal:
|
101
|
+
|
102
|
+
```shell
|
103
|
+
rake release
|
104
|
+
```
|
data/lib/mongoid_enumerable.rb
CHANGED
@@ -23,9 +23,7 @@ module MongoidEnumerable
|
|
23
23
|
send(field_name) == value
|
24
24
|
end
|
25
25
|
|
26
|
-
|
27
|
-
base.where(field_name => value)
|
28
|
-
end
|
26
|
+
scope value, -> { where(field_name => value) }
|
29
27
|
end
|
30
28
|
|
31
29
|
base.define_singleton_method("all_#{field_name}") do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_enumerable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Douglas Lise
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|