lib/friendly_id/candidates.rb in friendly_id-5.1.0 vs lib/friendly_id/candidates.rb in friendly_id-5.2.0.beta.1

- old
+ new

@@ -21,9 +21,12 @@ end.select {|x| wanted?(x)} unless pre_candidates.all? {|x| reserved?(x)} pre_candidates.reject! {|x| reserved?(x)} end + + return pre_candidates unless block_given? + pre_candidates.each {|x| yield x} end private