rails--rails/railties
eileencodes 845ba3013e
Fix schema_up_to_date connection
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.
2022-11-04 15:54:06 -04:00
..
bin Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
exe
lib Merge pull request #46346 from SHinGo-Koba/adjust_redis_version_in_template 2022-10-28 08:58:09 +09:00
test Fix schema_up_to_date connection 2022-11-04 15:54:06 -04:00
.gitignore
CHANGELOG.md Fixup CHANGELOGs [ci-skip] 2022-10-20 18:37:48 +09:00
MIT-LICENSE Bump license years to 2022 [ci-skip] 2022-01-01 15:22:15 +09:00
RDOC_MAIN.rdoc Changes the API documentation link to be relative instead of being absolute. This has been mentioned in #45001 2022-06-27 22:39:21 +02:00
README.rdoc Fix grammar mistakes [ci skip] 2021-04-10 22:15:52 -05:00
Rakefile Require shellwords where it is used 2022-01-06 00:19:11 +00:00
railties.gemspec Revert "Replace `method_source` gem with stdlib equivalent" 2022-09-08 16:58:52 -04:00

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