Apply Style/CollectionMethods rubocop rule

We were already using `map` and `reduce` almost everywhere.
This commit is contained in:
Javi Martín
2019-10-26 00:44:19 +02:00
parent e3bfcbcd25
commit eafb4018bf
27 changed files with 57 additions and 56 deletions

View File

@@ -83,9 +83,7 @@ module AdminHelper
end
def admin_select_options
Administrator.with_user
.collect { |v| [v.description_or_name, v.id] }
.sort_by { |a| a[0] }
Administrator.with_user.map { |v| [v.description_or_name, v.id] }.sort_by { |a| a[0] }
end
def admin_submit_action(resource)