- 27 1月, 2020 6 次提交
-
-
由 Ryuta Kamizono 提交于
Like as before Rails 6.0. Closes #38309.
-
由 Ryuta Kamizono 提交于
Follow up #37266.
-
由 Ryuta Kamizono 提交于
`@pairs` is an array of arrays, not a hash.
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
`send` is not necessary.
-
由 Vipul A M 提交于
-
- 26 1月, 2020 7 次提交
-
-
由 Xavier Noria 提交于
The method add_template_helper is private and used only in one place. I guess its purpose was to remove the noise of module_eval at the cost of an indirection. However, Module#include is public since Ruby 2.1, and the indirection is no longer justified for my taste. The loop in the caller is more straightforward now.
-
由 Eugene Kenny 提交于
Add CacheStore connection pool docs to guide
-
由 Petrik 提交于
When using Puma or another threaded server it is useful to know about connection pool options for the cache stores. This commit explains how to configure and enable the connection pool in the guides.
-
由 Vipul A M 提交于
Update code return value in debugging rails guide [ci skip]
-
由 Juanito Fatas 提交于
Now @_start_transaction_state set to nil instead of empty hash from https://github.com/rails/rails/commit/b1458218c95d85c4ce911dd3e99da5ae7cf7aeee.
-
由 Vipul A M 提交于
Update Migration number to ensure consistency on the document [ci skip]
-
由 davidauza-engineer 提交于
Updated Migration number to 6.0 as there were cases where it did show 5.0 and 5.2 which may lead to confusion on a newcomer reader.
-
- 24 1月, 2020 13 次提交
-
-
由 Rafael França 提交于
Document the return value of update_all [ci skip]
-
由 Rafael França 提交于
Use the model's adapter for the attribute type lookup
-
由 Rafael França 提交于
Update Migration number from 5.0 to current 6.0 [ci skip]
-
由 T.J. Schuck 提交于
-
由 davidauza-engineer 提交于
-
由 Carlos Antonio da Silva 提交于
Follow-up of 1ee4a881.
-
由 Eileen M. Uchitelle 提交于
Move advisory lock to it's own connection
-
由 eileencodes 提交于
This PR moves advisory lock to it's own connection instead of `ActiveRecord::Base` to fix #37748. As a note the issue is present on both mysql and postgres. We don't see it on sqlite3 because sqlite3 doesn't support advisory locks. The underlying problem only appears if: 1) the app is using multiple databases, and therefore establishing a new connetion in the abstract models 2) the app has a migration that loads a model (ex `Post.update_all`) which causes that new connection to get established. This is because when Rails runs migrations the default connections are established, the lock is taken out on the `ActiveRecord::Base` connection. When the migration that calls a model is loaded, a new connection will be established and the lock will automatically be released. When Rails goes to release the lock in the ensure block it will find that the connection has been closed. Even if the connection wasn't closed the lock would no longer exist on that connection. We originally considered checking if the connection was active, but ultimately that would hide that the advisory locks weren't working correctly because there'd be no lock to release. We also considered making the lock more granular - that it only blocked on each migration individually instead of all the migrations for that connection. This might be the right move going forward, but right now multi-db migrations that load models are very broken in Rails 6.0 and master. John and I don't love this fix, it requires a bit too much knowledge of internals and how Rails picks up connections. However, it does fix the issue, makes the lock more global, and makes the lock more resilient to changing connections. Co-authored-by: NJohn Crepezzi <john.crepezzi@gmail.com>
-
由 Eileen M. Uchitelle 提交于
Allow updating the database selector context with the response and not only the request
-
由 Rafael França 提交于
Use path instead of fullpath on validating authenticity token
-
由 Bibek Shrestha 提交于
PR #38211 introduced a bug where URLs with query_params will fail to validate authenticity token. This PR changes changes fullpath to path to fix the bug. I've also added a test with query_params
-
由 Eileen M. Uchitelle 提交于
Skip keeps option shouldn't restrict from creating empty directories
-
由 Eileen M. Uchitelle 提交于
Allow schema cache path to be defined in the database configuration file
-
- 23 1月, 2020 4 次提交
-
-
由 Katrina Owen 提交于
This updates the database tasks for dumping the Active Record schema cache as well as clearing the schema cache file, allowing the path to be defined in the database configuration YAML file. As before, the value can also be defined in an ENV variable, though this would not work for a multi-db application. If the value is specified neither in the DB config, nor in the ENV, then the path will continue to be derived from the DB config spec_name. Note that in order to make this change cleaner I also moved a bit of logic out of a rake task and into the DatabaseTasks class, for symmetry. We have two rake tasks for the schema cache: $ rake db:schema:cache:dump $ rake db:schema:cache:clear The cache:dump task was implemented in DatabaseTasks, but the cache:clear one was not. I also added some tests for the behavior that I was changing, since some of the code paths weren't tested.
-
由 Ryuta Kamizono 提交于
Update list of middleware for API-only in Guides [ci skip]
-
由 mikong 提交于
[ci skip]
-
由 Eileen M. Uchitelle 提交于
Deprecate `#remove_connection` in favor of `#remove_connection_pool`
-
- 22 1月, 2020 9 次提交
-
-
由 Carlos Antonio da Silva 提交于
Add Que backend to Active Job guide [ci skip]
-
由 Giovanni Kock Bonetti 提交于
-
由 Ryuta Kamizono 提交于
Fix keyword arguments warnings in Active Job
-
由 eileencodes 提交于
Calling `#remove_connection` on the handler is deprecated in favor of `#remove_connection_pool`. This change was made to support changing the return value from a hash to a `DatabaseConfig` object. `#remove_connection` will be removed in 6.2. NOTE: `#remove_connection` on `ActiveRecord::Base` will also now return a `DatabaseConfig` object. We didn't use a deprecation here since it's not documented that this method used to return a `Hash`. Co-authored-by: NJohn Crepezzi <john.crepezzi@gmail.com>
-
由 J Paterson 提交于
Closes #38276.
-
由 Carlos Antonio da Silva 提交于
Use --assume-yes to install the dependencies for Github's workflows:
-
由 Carlos Antonio da Silva 提交于
Add test for figcaption in actiontext
-
由 Eugene Kenny 提交于
Fix doc code formatting [ci skip]
-
由 T.J. Schuck 提交于
-
- 21 1月, 2020 1 次提交
-
-
由 Richard Schneeman 提交于
Fix syntax typo in changelog
-