aboutsummaryrefslogtreecommitdiffstats
path: root/lib/model_attribute.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-09-25 12:16:04 +0200
committerTeddy Wing2017-09-25 12:16:04 +0200
commitf4034d9d176a6402de135acd91dc34d7b39dbf4a (patch)
tree65c0cf9d3b7e1ee3bdedc86a7bf4d76fb65fa189 /lib/model_attribute.rb
parent76b3b813fb3cafc6880e50a57e823634a79d9a32 (diff)
downloadchouette-core-f4034d9d176a6402de135acd91dc34d7b39dbf4a.tar.bz2
ModelAttribute.classes: Move `#uniq` call higher
Call `#uniq` right after mapping over the `klass` attribute. Recommendation from Robert (thanks!). This means there are less elements to deal with in the subsequent maps. Refs #4401
Diffstat (limited to 'lib/model_attribute.rb')
-rw-r--r--lib/model_attribute.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/model_attribute.rb b/lib/model_attribute.rb
index 60580e306..9d821f551 100644
--- a/lib/model_attribute.rb
+++ b/lib/model_attribute.rb
@@ -12,9 +12,9 @@ class ModelAttribute
def self.classes
all
.map(&:klass)
+ .uniq
.map(&:to_s)
.map(&:camelize)
- .uniq
end
def self.group_by_class