Here is what I'm trying:
app/models/product.rb
class Product < ActiveRecord::Base
class << self
def searchlogic(conditions = {})
ProductSearch.new(self, scope(:find), conditions)
end
end
end
app/models/product_search.rb
require "searchlogic/search"
class ProductSearch < SearchLogic::Search
include SearchLogic
def foobar
puts :hello_world
end
end
test
~/project $ script/console
>> @search = Product.searchlogic
NameError: uninitialized constant SearchLogic
What's the appropriate way to subclass or extend SearchLogic::Search
?