On Feb 22, 8:52 pm, Grary <[email protected]> wrote: > Hi, > > From a model class, what is the standard way of ensuring uniqueness > across multiple columns (attributes) simultaneously? > > In other words, I want to ensure only unique "rows" are persisted to > storage. I feel like there must be a straightforward way to do this. > Any suggestions? >
validate_uniqueness' scope option does this (but you should really be using a unique index as well.) Fred > Thanks, > > Grar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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-talk?hl=en.

