Displaying 1 result from an estimated 1 matches for "array_conditions".
2006 Mar 01
2
Problem with paginate search
...poor english
I am doing a simple search with paginate, the problem is the search dont
find the words within acutes (example "dont find sal?n if i search salon").
Its the code for the seach:
def search
words = @params[''search''].to_s.split('' '')
array_conditions = []
for w in words
array_conditions = array_conditions + ["business LIKE ''%#{w}%''"]
end
conditions = array_conditions.join('' AND '')
@business_pages, @businesses = paginate :businesses, :per_page => 10,
:conditions => conditions...