Displaying 1 result from an estimated 1 matches for "scientificname".
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
...v>
<%= set_focus_to_id ''query'' %>
In one of the controller:-
******************************...........
def search
session[:query] = params[:query].strip if params[:query]
if session[:query] and request.xhr?
@plants_sn = Plant.find(:all, :conditions => ["scientificname
LIKE ?", "%#{session[:query]}%"], :order => "commonname ASC")
@plants_cm =Plant.find(:all, :conditions => ["commonname LIKE ?",
"%#{session[:query]}%"], :order => "commonname ASC")
@plants_desc =Plant.find(:all, :conditions =&g...