ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Ajax on Rails
Subject:   access from controller for :searchtext
Date:   2005-07-27 07:33:31
From:   k.y.l.e
Response to: access from controller for :searchtext

Just add :with => "'searchtext='+value'" to the observe_field call in the view.


<%= observe_field(:searchtext,
:frequency => 0.25,
:update => :search_hits,
:with => "'searchtext='+value",
:url => { :action => :live_search }) %>