Displaying 1 result from an estimated 1 matches for "for_sale".
2006 Feb 23
6
Search Forms with Pagination
...late the
search form
@view = Machine.new
@view.make = getParam("make")
@view.model = getParam("model")
# Search the database and populate our paging object
@filtered_machines = Machine.find(:all, :conditions => ["make
LIKE ? AND model LIKE ? AND for_sale = 1 AND web_width != 0",
sqlWildcard(@view.make),
sqlWildcard(@view.model)])
@machine_pages, @machines = paginate_collection(@filtered_machines)
end
def getParam(name, default="")
params.fetch("view", {}).fetch(name, de...