Class: ThinkingSphinx::AbstractAdapter
- Inherits:
-
Object
- Object
- ThinkingSphinx::AbstractAdapter
show all
- Defined in:
- lib/thinking_sphinx/adapters/abstract_adapter.rb
Class Method Summary
collapse
Class Method Details
.detect(model) ⇒ Object
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/thinking_sphinx/adapters/abstract_adapter.rb', line 9
def detect(model)
case model.connection.class.name
when "ActiveRecord::ConnectionAdapters::MysqlAdapter"
ThinkingSphinx::MysqlAdapter
when "ActiveRecord::ConnectionAdapters::PostgreSQLAdapter"
ThinkingSphinx::PostgreSQLAdapter
else
raise "Invalid Database Adapter: Sphinx only supports MySQL and PostgreSQL"
end
end
|
.setup ⇒ Object
4
5
6
7
|
# File 'lib/thinking_sphinx/adapters/abstract_adapter.rb', line 4
def setup
end
|