Displaying 1 result from an estimated 1 matches for "rb__".
Did you mean:
r__
2006 May 23
1
Help with observe_field
...observe_field(:search,
:frequency => 0.25,
:update => :search_hits,
:url => { :action => "search"}) %>
<p>Search Results:</p>
<div id="search_hits"></div>
__Controller: search_controller.rb__
class SearchController < ApplicationController
WORDLIST = %w(Rails is a full-stack, really cool, open-source, free
thingy!)
def search
@phrase = request.raw_post || request.query_string
matcher = Regexp.new(@phrase)
@results = WORDLIST.find_all {|word|word =~ matcher}
ren...