search for: otatoes

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

Did you mean: potatoes
2006 May 30
3
match operator in find
...to use the match operator (=~) in a find operation? Or is it not possible? I''ve got some data items from an external source that could be capitalized or not. So right now I''m stuck with doing: Item.find(:first, :conditions => ["name = ? or name =?", Potatoes, potatoes]) I''d prefer to do: Item.find(:first, :conditions => ["name =~ ?", /(P|p)otatoes]) The first works, but it doesn''t seem very Rails-like. I''m getting nil results on the second. TIA, Bill -------------- next part -------------- An H...