diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 17:52:51 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-23 17:52:51 -0800 |
commit | 0687b21de879d53157e52a2b688e34a1bd1e31f0 (patch) | |
tree | a5cda70bf73fd2c65c767e165e0358da405ca53c | |
parent | 1aaa8edeb958a263c7a256344f442867c4b90c5f (diff) | |
download | rails-0687b21de879d53157e52a2b688e34a1bd1e31f0.tar.gz rails-0687b21de879d53157e52a2b688e34a1bd1e31f0.tar.bz2 rails-0687b21de879d53157e52a2b688e34a1bd1e31f0.zip |
removing ternary
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 23831e0b08..156279a67a 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -42,7 +42,7 @@ module ActiveRecord # documented side-effect of the method that may avoid an extra SELECT. @target ||= [] and loaded if count == 0 - @reflection.options[:limit] ? [@reflection.options[:limit], count].min : count + [@reflection.options[:limit], count].compact.min end def has_cached_counter? |