search for: dudebotwrot

Displaying 1 result from an estimated 1 matches for "dudebotwrot".

Did you mean: dudebotwrote
2009 Sep 25
12
uniqueness validation perplexity
I want to write a validate routine to check to enforce that a position must be unique in a category. (In another category, it doesn''t have to and shouldn''t need to be unique.) I write this code which works happily for new items: def position_in_category_not_unique @items = Item.find( :all, :conditions => [ "category_id = ? AND position = ?", category_id,