Skip to content

Commit

Permalink
add commented out unspeced search scope
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Jul 30, 2008
1 parent 47944ad commit 2d18c06
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/can_search/search_scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,22 @@ def ==(other)
end
end

SearchScopes.scope_types[:reference] = ReferenceScope
#class LikeQueryScope < BaseScope
# def initialize(model, name, options = {})
# super
# @named_scope = options[:named_scope] || "like_#{name}".to_sym
# @model.named_scope @named_scope, lambda { |q| {:conditions => ["#{@name} LIKE ?", "%#{q}%"]} }
# end
#
# def scope_for(finder, options = {})
# query = options.delete(@name)
# query.blank? ? finder : finder.send(@named_scope, query)
# end
#end

SearchScopes.scope_types.update \
:reference => ReferenceScope#,
#:like => LikeQueryScope
end

send respond_to?(:require_dependency) ? :require_dependency : :require, 'can_search/date_range_scope'

0 comments on commit 2d18c06

Please sign in to comment.