Skip to content

Commit

Permalink
Username not defined in database.yml should not raise an exception wh…
Browse files Browse the repository at this point in the history
…en generating configuration file.
  • Loading branch information
slainer68 authored and pat committed Jan 24, 2009
1 parent 951f23e commit 9401723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thinking_sphinx/index.rb
Expand Up @@ -277,7 +277,7 @@ def set_source_database_settings(source)
config = @model.connection.instance_variable_get(:@config)

source.sql_host = config[:host] || "localhost"
source.sql_user = config[:username] || config[:user]
source.sql_user = config[:username] || config[:user] || ""
source.sql_pass = (config[:password].to_s || "").gsub('#', '\#')
source.sql_db = config[:database]
source.sql_port = config[:port]
Expand Down

0 comments on commit 9401723

Please sign in to comment.