Skip to content

Commit cf210f3

Browse files
authored
Merge pull request #1270 from cerebris/cleanup
Remove extra assignments
2 parents ef6fb96 + f4d45b1 commit cf210f3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/jsonapi/active_relation/join_manager.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ def perform_joins(records, options)
154154
next
155155
end
156156

157-
records, join_node = self.class.get_join_arel_node(records, options) {|records, options|
158-
records = related_resource_klass.join_relationship(
159-
records: records,
160-
resource_type: related_resource_klass._type,
161-
join_type: join_type,
162-
relationship: relationship,
163-
options: options)
157+
records, join_node = self.class.get_join_arel_node(records, options) {|records, options|
158+
related_resource_klass.join_relationship(
159+
records: records,
160+
resource_type: related_resource_klass._type,
161+
join_type: join_type,
162+
relationship: relationship,
163+
options: options)
164164
}
165165

166166
details = {alias: self.class.alias_from_arel_node(join_node), join_type: join_type}

lib/jsonapi/active_relation_resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def find_fragments(filters, options = {})
155155

156156
fragments = {}
157157
rows = records.pluck(*pluck_fields)
158-
rows.collect do |row|
158+
rows.each do |row|
159159
rid = JSONAPI::ResourceIdentity.new(resource_klass, pluck_fields.length == 1 ? row : row[0])
160160

161161
fragments[rid] ||= JSONAPI::ResourceFragment.new(rid)

0 commit comments

Comments
 (0)