Module: CloudSearchRails::Search
- Defined in:
- lib/cloud_search_rails/search.rb
Defined Under Namespace
Modules: ClassMethods, WillPaginateMethods
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cloud_search_rails/search.rb', line 5 def self.included(klass) klass.send(:extend, ClassMethods) klass.class_eval do # lambda block for the scope scope_def = lambda{|*ids| { :conditions => [ "#{self.table_name}.#{self.primary_key} IN (?)", ids.flatten ] } } named_scope :cloud_search_rails_scope, scope_def do include WillPaginateMethods end end end |