Class: Chewy::Index::Adapter::ActiveRecord
- Defined in:
- lib/chewy/index/adapter/active_record.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Orm
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Orm
#identify, #import, #import_fields, #initialize, #load, #name
Methods inherited from Base
#identify, #import, #import_fields, #import_references, #load, #name, #type_name
Constructor Details
This class inherits a constructor from Chewy::Index::Adapter::Orm
Class Method Details
.accepts?(target) ⇒ Boolean
7 8 9 10 11 |
# File 'lib/chewy/index/adapter/active_record.rb', line 7 def self.accepts?(target) defined?(::ActiveRecord::Base) && ( (target.is_a?(Class) && target < ::ActiveRecord::Base) || target.is_a?(::ActiveRecord::Relation)) end |