has_many_through_mongodb 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89d9d3b0e9db6b46746120be0c4e346a7b99bcaeded1f4b022d7a2223b4dfa07
4
- data.tar.gz: a3617637c0b3f7ec4e9aa2512426d17ce1e22bf891b47821a74de289861de748
3
+ metadata.gz: 6c6e62da4193c150743467b0f6d5c2d0da01cc5ec2264654d6b3adb6b832410c
4
+ data.tar.gz: 8656b588eefe9c31945a41b2ae7dd3e563fefe35d7c555cde455bbaf7dd199d9
5
5
  SHA512:
6
- metadata.gz: 3d39616c289e752e04c162c7575b561b08621f3713c90eec4f00acdfe8d7342db6c9dec8ce8c5717db93bdba6dcf6ce9009c1f6351e8f2a90c046189c121f6f6
7
- data.tar.gz: cbc559c2335a08611db37a36aadb064ba33394d1641ed8096e874ed403051091a9c719f5eb79883e4aa869346fc8309abe480180110640b3a05b31c25f749fa8
6
+ metadata.gz: 1261ca802ae12b8219dfd6212c26060e406f7f31eacae9c2c41ee87391388592714837a5cb0b5eed9b8165c632077fc3dbef29d32737e0925d5b7dc8a81f98b0
7
+ data.tar.gz: af072d9fbc60f4790a01b6b9994d8458a390b5f51425f5e6571a751d0033d181049a813214d09e41a6e2d360758e45a8b63e94a1d904d55fbc7540644726429a
@@ -14,12 +14,12 @@ module HasManyThroughMongodb
14
14
  #{model_name}_ids.present?
15
15
  end
16
16
 
17
- def has_#{model_name.pluralize}?
18
- has_#{model_name}_ids? ? #{model}.in(id: #{model_name}_ids).count != 0 : false
17
+ def #{model_name.pluralize}
18
+ #{model}.in(id: #{model_name}_ids)
19
19
  end
20
20
 
21
- def #{model_name.pluralize}
22
- has_#{model_name}_ids? ? #{model}.in(id: #{model_name}_ids) : []
21
+ def has_#{model_name.pluralize}?
22
+ #{model_name.pluralize}.count != 0
23
23
  end
24
24
  METHODS
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module HasManyThroughMongodb
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_many_through_mongodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lalit Kumar Maurya