is there any chance that searchlogic will support class method that returns a scope or ActiveRecord::Relation.
They both support chainable lazily queries, this is better to construct more complex name scopes that has parameters, (default param value in a lambda is pain between Ruby 1.8/1.9)
example
# Rails 2
class Task < ActiveRecord::Base
# scopes
def self.completed
scoped(:conditions => {:status => 'completed'})
end
end
# Rails 3
class Task < ActiveRecord::Base
# scopes
def self.completed
where(:status => 'completed')
end
end
is there any chance that searchlogic will support class method that returns a scope or ActiveRecord::Relation.
They both support chainable lazily queries, this is better to construct more complex name scopes that has parameters, (default param value in a lambda is pain between Ruby 1.8/1.9)
example