Sha256: e70eb75ebcced44fa38f5725bfde3ac2b89cb876d1a9bc2ea7dcb9e10f76543a
Contents?: true
Size: 732 Bytes
Versions: 8
Compression:
Stored size: 732 Bytes
Contents
module ThinkingSphinx class AbstractAdapter class << self def setup # Deliberately blank - subclasses should do something though. Well, if # they need to. end 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 protected def connection @connection ||= ::ActiveRecord::Base.connection end end end end
Version data entries
8 entries across 8 versions & 2 rubygems