Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_database doesn't work in Rails 4.2 #885

Closed
antage opened this issue Jan 29, 2015 · 1 comment
Closed

set_database doesn't work in Rails 4.2 #885

antage opened this issue Jan 29, 2015 · 1 comment

Comments

@antage
Copy link

antage commented Jan 29, 2015

In Rails 4.2 ActiveRecord::Base.configurations has all keys as string. But TS can't read database parameters because trying find it by symbol keys.

I convert all keys in symobls as workaround:

set_database ActiveRecord::Base.configurations["production"].map { |k, v| [k.to_sym, v] }.to_h
pat added a commit that referenced this issue Feb 8, 2015
ActiveRecord 4.2 now uses strings consistently. Closes #885.
@pat
Copy link
Owner

pat commented Feb 8, 2015

Thanks for reporting this - I've just fixed it in the develop branch.

@pat pat closed this as completed Feb 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants