Solution
Well, I found out the hard way first, then by asking another question, I inadvertently found a better answer to my original question. Here's the secondary question.
Model
# app/models/product.rb
class Product < ActiveRecord::Base
scope_procedure :keywords, lambda { |query|
name_like_any(query.split(/\s+/))
}
end
Controller
# app/controllers/products_controller.rb
class ProductsController < ApplicationController
def index
@search = Product.search(params[:search])
@products = @search.all
end
end
Views
# app/views/products/index.html.erb
<% form_for @search do |f| %>
<%= f.label :keywords, "Quick Search" %>
<%= f.input :keywords %>
<%= f.submit, "Go" %>
<% end %>
Stay tuned...
I'm having difficulty rallying up some of the more hard-to-answer questions for Searchlogic 2.x, but because tasks aren't always so straightforward, other questions tend to surface. Here's one I hope to answer that's not covered here.
How to sanitize form params for use with Searchlogic?