Displaying 1 result from an estimated 1 matches for "title_search_str".
2010 Jan 07
2
Find by looping thru array
...ray then send the query results
to a partial.
I have the following...
- projects_controller -
def search
# get list of search parameters from id sent.
list = params[:id]
# split by comma
list = list.split('','')
# assign each
id_search_string = list[0]
title_search_string = list[1]
# create new instance of Levenshtein using ''amatch''
m = Levenshtein.new(title_search_string)
# retrieve all titles from projects
@title = Project.find(:all, :select => ''DISTINCT id, title'')
# create projects array
projects...