Replace Hash#compact with #reject for Rails < 4.1

This commit is contained in:
Jon Atack 2014-09-12 23:45:50 +02:00
parent 8752f75d79
commit 93dea68e05
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ module Ransack
:attr_fallback_name => attr_fallback_name(associated_class), :attr_fallback_name => attr_fallback_name(associated_class),
:association_name => association_name :association_name => association_name
} }
.compact .reject! { |_, value| value.nil? }
end end
def self.attr_fallback_name(associated_class) def self.attr_fallback_name(associated_class)