class NobelistsController < ApplicationController

  include Repertoire::Faceting::Controller

  def index
    @search = params[:search] || ''
    render
  end

  def visualize
    @search = params[:search] || ''
    render
  end
  
  # webservice bases

  protected
  def base(facet=nil)
    search = "%#{params[:search]}%"
    
    base = Nobelist
    base = base.facet_for(facet) if facet
    
    base.where(["name ilike ?", search])
  end
  
end

class NobelistsController < ApplicationController

  include Repertoire::Faceting::Controller

  def index
    @search = params[:search] || ''
    render
  end

  def visualize
    @search = params[:search] || ''
    render
  end
  
  # webservice bases

  protected
  def base(name=nil)
    search = "%#{params[:search]}%"
    base = Nobelist.where(["name ilike ?", search])    
    name ? base.facet(name) : base
  end
  
end

Update to use <relation>.facet(:foo) in controller
Update to use <relation>.facet(:foo) in controller
