Yes, the Hobo option is less inclusive than all of the standard Rails validations. That was probably not the best example to use in the book. :-)
On Fri, Mar 19, 2010 at 6:32 PM, Aaron Spiegel <[email protected]> wrote: > I think the "unique" validation should work: > > validates_uniqueness_of :name, :case_sensitive => false > > > On Fri, Mar 19, 2010 at 4:38 PM, Deniz Rende <[email protected]> > wrote: > > In Rapid Rails with Hobo book, tutorial 3 refers to field validation. To > > prevent duplicate entries, the tutorial suggests adding ":unique" after > the > > name. > > While this is indeed preventing adding the same record twice, it does not > > prevent same records with different capitalized letters. For example, > > eventhough logically the following two names are the same, hobo > application > > does not prevent entering these two records: > > john doe > > John Doe > > How can I make sure that the capitalization is also included in the > > validation, so that both entries are same and unique? > > Thanks... > > > > -- > > Deniz Rende > > E-mail: [email protected] > > Phone: +1 (224) 789-UNIX (8649) > > Mobile: +1 (816) 213-2139 > > Web: http://www.deniz-rende.com/blog > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Hobo Users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<hobousers%[email protected]> > . > > For more options, visit this group at > > http://groups.google.com/group/hobousers?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<hobousers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/hobousers?hl=en. > > -- Thanks, - Owen -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
