diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-04-09 23:31:10 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-04-09 23:31:14 -0300 |
commit | 9a8af0c15089fbdc18fa75115586ab6febcd4d06 (patch) | |
tree | 11659d0fccdde1ccde59f6945a8332f01f306f9b /activerecord/lib | |
parent | cf0e44c771319bcd8ec0038f8502fe0baa5fa738 (diff) | |
download | rails-9a8af0c15089fbdc18fa75115586ab6febcd4d06.tar.gz rails-9a8af0c15089fbdc18fa75115586ab6febcd4d06.tar.bz2 rails-9a8af0c15089fbdc18fa75115586ab6febcd4d06.zip |
Only call uniq on the conditional that actually needs it
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 22ee2238ce..1724ea95b0 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -617,7 +617,7 @@ module ActiveRecord # # => [:tag, :tags] # def source_reflection_names - (options[:source] ? [options[:source]] : [name.to_s.singularize, name]).uniq + options[:source] ? [options[:source]] : [name.to_s.singularize, name].uniq end def source_reflection_name # :nodoc: |