![]() This method was failing to return the connection to the correct state which would break tests when eager loading the application. What's happening is that when we check `schema_up_to_date` when the application is eager loaded all the models are eager loaded as well so it sees that ApplicationRecord has a connection already but that connection is set to the wrong one. It doesn't get replaced with the right one so we see errors about looking for tables in the wrong database. This doesn't happen when eager loading is off because ApplicationRecord isn't set and gets initialized with the correct connection (from it's `connects_to/establish_connection` call). I also refactored this to pull `needs_update` into a method and make the loop easier to read. |
||
---|---|---|
.. | ||
bin | ||
exe | ||
lib | ||
test | ||
.gitignore | ||
CHANGELOG.md | ||
MIT-LICENSE | ||
RDOC_MAIN.rdoc | ||
README.rdoc | ||
Rakefile | ||
railties.gemspec |
README.rdoc
= Railties -- Gluing the Engine to the Rails Railties is responsible for gluing all frameworks together. Overall, it: * handles the bootstrapping process for a Rails application; * manages the +rails+ command line interface; * and provides the Rails generators core. == Download The latest version of Railties can be installed with RubyGems: * gem install railties Source code can be downloaded as part of the Rails project on GitHub * https://github.com/rails/rails/tree/main/railties == License Railties is released under the MIT license: * https://opensource.org/licenses/MIT == Support API documentation is at * https://api.rubyonrails.org Bug reports can be filed for the Ruby on Rails project here: * https://github.com/rails/rails/issues Feature requests should be discussed on the rails-core mailing list here: * https://discuss.rubyonrails.org/c/rubyonrails-core