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 Mar 14, 2023
1 parent ee7f42b commit 2ebfd61
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 @@ -191,8 +191,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 2ebfd61

Please sign in to comment.