diff options
| author | Teddy Wing | 2017-09-25 12:16:04 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-09-25 12:16:04 +0200 | 
| commit | f4034d9d176a6402de135acd91dc34d7b39dbf4a (patch) | |
| tree | 65c0cf9d3b7e1ee3bdedc86a7bf4d76fb65fa189 /lib | |
| parent | 76b3b813fb3cafc6880e50a57e823634a79d9a32 (diff) | |
| download | chouette-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')
| -rw-r--r-- | lib/model_attribute.rb | 2 | 
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 | 
