mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
095f1bfaa0
This method was jumping through extra hoops to find the name of the class the connection is stored on when we can get it from the connection itself. Since we already have the connection we don't need to loop through the pools. In addition, this was using the wrong class name. The class name for the schema migration should come from the connection owner class, not from the `db_config.name`. In this case, `db_config.name` is the name of the configuration in the database.yml. Rails uses the class name to lookup connections, not the db config name, so we should be consistent here. While working on this I noticed that we were generating an extra schema migration class for `ActiveRecord::Base`. Since `ActiveRecord::Base` can and should use the default and we don't want to create a new one for single db applications, we should skip creating this if the spec name is `ActiveRecord::Base`. I added an additional test that ensures the class generation is correct. |
||
---|---|---|
.. | ||
bin | ||
exe | ||
lib | ||
test | ||
.gitignore | ||
CHANGELOG.md | ||
MIT-LICENSE | ||
railties.gemspec | ||
Rakefile | ||
RDOC_MAIN.rdoc | ||
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/master/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://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core