better_pluck 0.8.2 → 0.8.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: 83d2ba399cdf1848de1258f66771a26eac48b4e0939abe19980dbbf34c063014
4
- data.tar.gz: 24538a5fa58dd886b10691e052883add22c14db14d7baddec85bd44b02dc9f82
3
+ metadata.gz: e8917c7d3302302254ac42ec1c446b15fabb23607e4b5fd4990d178c83dcec6c
4
+ data.tar.gz: 6ce82126054ac4e23c4081766d9858b0667c5cc7ad0fcf038bde152e6f2c141f
5
5
  SHA512:
6
- metadata.gz: 5f905dd32f2016e98149e54b5437eb9261d0cb0e60e92c93d8b8a0d9e387758aba4f74b4f1951fe3602c1a89a5ff755d91347323cf8a4048b31fb4044c29d3e1
7
- data.tar.gz: f527fdf678709f3d29f63c0cf4d60fa91efe73dd853f4b3de0a161297c4ab9170c13a3a2de9bb92bc93bd62850c87041c8edc549a283645cc518abd54096b175
6
+ metadata.gz: cf18f8667bdf3edc65fb3db70e9677cb14190c2da0788caddf8398a5e2ca4f86ca32c99ee78e9868d24900014cb0474da11df7ba942a48210a95481deb69bd7f
7
+ data.tar.gz: 3a9959d18d9c0210b9b12e97e914223158caeb1cf9451c666384eb329d9ecdc4ed508b8fbb613cf1661a6478112ab0bf98f5a2e103412e9659f39847e2356873
@@ -45,8 +45,8 @@ module BetterPluck::PluckWithMethods
45
45
  end
46
46
  end
47
47
 
48
- # usage: articles = Article.pluck_with_display_name(:id,:name, author: [:name,:email])
49
- # articles.first.display_name, articles.first.author.display_name
48
+ # usage: zones = Zone.pluck_with_display_name(:id,:name, partner: [:имя,:email], location: [:name])
49
+ # zones.first.display_name, zones.first.partner.display_name
50
50
  def pluck_with_display_name(*fields_and_methods)
51
51
  fields_and_methods << :display_name unless fields_and_methods.include?(:display_name)
52
52
 
@@ -124,7 +124,7 @@ module BetterPluck::PluckWithMethods
124
124
 
125
125
  metadata[:associations].each do |assoc_name, sub_metadata|
126
126
  assoc_reflection = klass.reflect_on_association(assoc_name)
127
- # ARs left_joins usually uses the table name for the join alias unless there is a collision
127
+ # AR's left_joins usually uses the table name for the join alias unless there's a collision
128
128
  _pluck_methods_build_columns(assoc_reflection.klass, sub_metadata, list, assoc_reflection.table_name)
129
129
  end
130
130
  end
@@ -1,3 +1,3 @@
1
1
  module BetterPluck
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_pluck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - NazarK