From 63895723de7943261e4b84807570e45073f7748c Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Wed, 5 Oct 2016 01:13:05 +0800 Subject: [PATCH] make code climate happier --- app/models/map.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/models/map.rb b/app/models/map.rb index 2c6b9833..a8e9c866 100644 --- a/app/models/map.rb +++ b/app/models/map.rb @@ -39,15 +39,8 @@ class Map < ApplicationRecord Perm.short(permission) end - # return an array of the contributors to the map def contributors - contributors = [] - - mappings.each do |m| - contributors.push(m.user) unless contributors.include?(m.user) - end - - contributors + mappings.map(&:user).uniq end def editors