association_selection 0.1.0 → 0.1.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/lib/association_selection/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: 667577fd5622797955335c8720f5d40229ffa781fad3f84fd79264f60ff79c81
|
4
|
+
data.tar.gz: 01300561a730d06fe065d9c4f62a40f2d7df90a4ad0a28022515fec3fba0ec76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cf063db783319469e5445fc775664908233e586a861925330240069722a3d05335dcc3935f6aaff965c98e045aeb747613010175dc8e9c3c59111bc43efcb3d
|
7
|
+
data.tar.gz: afb9092e8f888616bdd7f5d86bbd24160ac76bc1dc31d3b76720480bec37f2bb7dfba195586232838de95d251ba7775f4e7e60f2a7dfd314c67882e746b1b56c
|
data/README.md
CHANGED
@@ -73,7 +73,7 @@ end
|
|
73
73
|
#### Query
|
74
74
|
```ruby
|
75
75
|
# Preload employees with only selected fields
|
76
|
-
departments = Department.assoc_select(:
|
76
|
+
departments = Department.assoc_select(employees: %i[id name department_id]).includes(:employees)
|
77
77
|
|
78
78
|
departments.each do |department|
|
79
79
|
department.employees.each do |employee|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: association_selection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vương Khải Hà
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
|
-
rubygems_version: 3.
|
50
|
+
rubygems_version: 3.3.3
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Select fields for ActiveRecord associations
|