Skip to content

Instantly share code, notes, and snippets.

@squeejee
Created May 18, 2009 02:58
Show Gist options
  • Save squeejee/113288 to your computer and use it in GitHub Desktop.
Save squeejee/113288 to your computer and use it in GitHub Desktop.
class Lesson < ActiveRecord::Base
named_scope :find_with_xapian, lambda { |*args| {:conditions => ["lessons.id in (?)", ActsAsXapian::Search.new([Lesson], args.to_s).results.collect{|x| x[:model].id}]}}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment