rails/rails — pull request #4660 by pwim (2012-01-25 08:37:20+00:00)
Title: Fix regression with find_or_create and multiple arguments

Under Rails 3.1, you were allowed to pass a hash to a find_or_create method with multiple attribute names, but this was broken as the arguments were being improperly validated.

The patch I've made is pretty hacky, and if DynamicFinderMatch was to handle the validation of method calls, this could be a lot nicer, but that would require a major refactoring.