Mongo config read as strings instead of symbols
jrobhsi opened this issue · 2 comments
Not sure if I'm doing something wrong or just different than everyone else; my mongo config yaml is being read as a hash of strings, so the (for example) database_name does not get set when calling:
@database_name = config.delete(:database) || default_db_name
I'm looking at nunemaker's approach to reading config in his call to connect (line 68) as a possible solution.
In addition, I'm wondering if it makes sense to provide a default host and port (localhost, and ... whatever the default port is for mongo)? I'll see if I can't put a pull request together, unless someone fires back with what I may be doing wrong in my yaml file. 😃 I figure since this bug doesn't exist, I must be missing something obvious in my yaml...
development: &dev
database: POC_dev
For symbol keys in yaml, you can try :database:
instead.
Good to know! I submitted a pull request just to add the call to symbolize_keys nonetheless.