Just FYI values.nil? || values.empty? could be replaced with values.blank? (though I'm not going to hold up this pull request to wait for such a minor edit)