Module: MetaSearch::Searches::ActiveRecord

Defined in:
lib/meta_search/searches/active_record.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/meta_search/searches/active_record.rb', line 10

def self.included(base)
  base.extend ClassMethods

  base.class_eval do
    class_attribute :_metasearch_include_attributes, :_metasearch_exclude_attributes
    class_attribute :_metasearch_include_associations, :_metasearch_exclude_associations
    class_attribute :_metasearch_methods
    self._metasearch_include_attributes =
      self._metasearch_exclude_attributes =
      self._metasearch_exclude_associations =
      self._metasearch_include_associations = {}
    self._metasearch_methods = {}
  end
end