search for: searched_nam

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

Did you mean: searched_name
2006 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there ! I try to figure out how to do something like this in Rails : SELECT * FROM my_table WHERE name LIKE ''GOGONAM%'' My problem is the % and the quotes. >From now, I do like this : searched_name = params[:name]+''%'' user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name]) But is there a more gracefull way to do a LIKE find in ActiveRecord ? Thanks. -- Posted via http://www.ruby-forum.com/.