views:

70

answers:

0

Because

Shoe.color_equals('Dark Brown') != Shoe.color_equals('dark-brown')

Is there a way to do something like:

Shoe.parameterized_color_equals('dark-brown')

Not that the api has to be exactly that, but is there a way to accomplish what I've outlined with searchlogic?

edit

I'll send in the GET params: dark-brown but want to match "Dark Brown" in the database. Before using searchlogic for this project I got all of my records with @shoes = Shoe.all, then I'd select them something like:

@shoes.select{|s| s.color.parameterize == 'dark-brown'}

I've since quit sending parameterized variables and just send them as they are and everything is fine, but I am still curious if there's a way to customize the way the searches match records.