Jonathan Viney wrote: > Another thought .... how about replacing find(:first) with find(:one). > :first implies some sort of order where none actually exists.
Not replacing, but creating a new option. find :first would find only the first record; if there are more than one, only the first is returned. find :one would imply that one and only one match should exist: if no match is found, RecordNotFound would be raised; if more than one match is found, something like NonUniqueResult would be raised. -- Marcus Brito --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
