Module: IndexedSearch::Index
- Defined in:
- lib/indexed_search/index.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods Classes: BadModelException
Class Method Summary collapse
- .extended(base) ⇒ Object
-
.included(base) ⇒ Object
make the whole thing work when included and extended:.
- .initialize_methods(base) ⇒ Object
Class Method Details
.extended(base) ⇒ Object
330 331 332 |
# File 'lib/indexed_search/index.rb', line 330 def self.extended(base) initialize_methods(base) end |
.included(base) ⇒ Object
make the whole thing work when included and extended:
327 328 329 |
# File 'lib/indexed_search/index.rb', line 327 def self.included(base) initialize_methods(base) end |
.initialize_methods(base) ⇒ Object
333 334 335 336 337 |
# File 'lib/indexed_search/index.rb', line 333 def self.initialize_methods(base) base.instance_eval { include IndexedSearch::Index::InstanceMethods } base.extend IndexedSearch::Index::ClassMethods raise BadModelException.new("#{base.name} does not appear to be an ActiveRecord model.") unless base.respond_to?(:has_many) end |