Hi guys,

I'm looking for a way to pick up database records by comparing my string
to the database record's string.

The catch is that I have to "clean up" the database strings (not change
the record, just for the purpose of this query).

The basic query is:

Book.where(“title = ?”,”hello”)

And I have an array of substrings e.g.

["XX","YY","AB"," "]  (the last one is space)

So a record where “hellXX o” or “XX  YY  hellXX o YY   ” would be picked
up.

Any ideas? (performance is not important)

Thanks..!

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/72a9ca1464a08150e2fcda643ae7f08b%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to