# File lib/thinking_sphinx/adapters/abstract_adapter.rb, line 12 def self.detect(model) adapter = adapter_for_model model case adapter when :mysql ThinkingSphinx::MysqlAdapter.new model when :postgresql ThinkingSphinx::PostgreSQLAdapter.new model when Class adapter.new model else raise "Invalid Database Adapter: Sphinx only supports MySQL and PostgreSQL, not #{adapter}" end end