Skip to content

Commit 6f5a865

Browse files
committed
Fix Performance/MethodObjectAsBlock warning
1 parent 2016808 commit 6f5a865

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/ext_management_system.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ def edit_with_params(params, endpoints, authentications)
191191
authentications_changed ||= authentications_to_delete.delete_all > 0
192192

193193
ems.assign_attributes(params)
194-
ems.endpoints = endpoints.map(&method(:assign_nested_endpoint))
195-
ems.authentications = authentications.map(&method(:assign_nested_authentication))
194+
ems.endpoints = endpoints.map { |ep| assign_nested_endpoint(ep) }
195+
ems.authentications = authentications.map { |auth| assign_nested_authentication(auth) }
196196

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

0 commit comments

Comments
 (0)