Created
December 13, 2011 18:52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Have the Source use the main_search database if it exists. | |
module ThinkingSphinx | |
class Source | |
def set_source_database_settings(source) | |
config = @database_configuration | |
source.sql_host = config[:main_search] || config[:host] || "localhost" | |
source.sql_user = config[:username] || config[:user] || 'root' | |
source.sql_pass = (config[:password].to_s || "").gsub('#', '\#') | |
source.sql_db = config[:database] | |
source.sql_port = config[:port] | |
source.sql_sock = config[:socket] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Thinking Sphinx 1.4.4