Skip to content

Commit

Permalink
Fix Performance/MethodObjectAsBlock warning
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Dec 9, 2022
1 parent 1215980 commit b9d480e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def edit_with_params(params, endpoints, authentications)
authentications_changed ||= authentications_to_delete.delete_all > 0

ems.assign_attributes(params)
ems.endpoints = endpoints.map(&method(:assign_nested_endpoint))
ems.authentications = authentications.map(&method(:assign_nested_authentication))
ems.endpoints = endpoints.map { |ep| assign_nested_endpoint(ep) }
ems.authentications = authentications.map { |auth| assign_nested_authentication(auth) }

endpoint_changes = ems.endpoints.select(&:changed?).to_h do |ep|
[ep.role.to_sym, ep.changes]
Expand Down

0 comments on commit b9d480e

Please sign in to comment.