- 17 10月, 2018 5 次提交
-
-
由 Gannon McGibbon 提交于
Fix mapping of content [ci skip]
-
由 Adam Demirel 提交于
-
由 Aaron Patterson 提交于
Refactored abstract MySQL adapter to support lazy version check.
-
由 Gannon McGibbon 提交于
Clarify docs of `ActiveJob::TestHelper` [ci skip]
-
由 Brooke Kuhlmann 提交于
Will allow sub classes to override the protected `#check_version` method hook if desired. For example, this will be most helpful in sub classes that wish to support lazy initialization because the version check can be postponed until the connection is ready to be initialized.
-
- 16 10月, 2018 9 次提交
-
-
由 Ryuta Kamizono 提交于
Add regression test against has_and_belong_to_many memoized singular_ids
-
由 Richard Schneeman 提交于
Extend doc for ActiveSupport::Cache#fetch_multi
-
由 Alberto Almagro 提交于
Starting in Rails 5.0.0 and still present in Rails 5.2.1, `singular_ids` got memoized and didn't reload after more items were added to the relation. Although 19c80718 happens to fix the issue, it only adds tests for `has_many` relations while this bug only affected `has_and_belongs_to_many` relations. This commit adds a regression test to ensure it never happens again with `habtm` relations. Ensures #34179 never gets reproduced.
-
由 Carlos Donderis 提交于
-
由 Ryuta Kamizono 提交于
Issue #29200 scaffold an object with a reference displays an object memory address to user
-
由 Ryuta Kamizono 提交于
Fix Collection cache key with limit and custom select
-
由 Federico Martinez 提交于
Change query to use alias name for timestamp_column to avoid ambiguity problems when using timestamp from subquery.
-
由 bogdanvlviv 提交于
I found a few sentences that should be updated as well. See https://github.com/rails/rails/pull/33571#discussion_r209435886 Follow up #33571
-
由 Francesco Rodríguez 提交于
In favor of String#is_utf8?. I think this method was made for internal use only, and its usage was removed here: https://github.com/rails/rails/pull/8261/files#diff-ce956ebe93786930e40f18db1da5fd46L39.
-
- 15 10月, 2018 7 次提交
-
-
由 Ryuta Kamizono 提交于
Update snippet to rails 5 syntax [ci skip]
-
由 Bogdan 提交于
* Fix `ActionController::Parameters#each_value` `each_value` should yield with "value" of the params instead of "value" as an array. Related to #33979 * Add changelog entry about `ActionController::Parameters#each_value`. Follow up #33979
-
由 Andrew White 提交于
Fix issue where duration where always rounded up to a second:
-
由 Adam Demirel 提交于
-
由 Ryuta Kamizono 提交于
`developers.name desc` was added at d59f3a78, but any test case isn't failed even if the `developers.name desc` is removed since all tested developers are consistently ordered on both `name` and `id`. I changed one developers creation ordering to ensure to test that `project.developers` is ordered by `developers.name desc`.
-
由 Yuji Yaginuma 提交于
Fix tests on Mail 2.7.1
-
由 Rasesh Patel 提交于
Resolve Issue#29200 When scaffolding a model that references another model the generated show and index html pages display the object directly on the page. Basically, it just shows a memory address. That is not very helpful. In this commit we show the object's id rather than the memory address. This updates the scaffold templates and the json builder files.
-
- 14 10月, 2018 2 次提交
-
-
由 yuuji.yaginuma 提交于
Up to `2.7.0`, encoding was chosen using `Mail::Encodings::TransferEncoding.negotiate`, and base64 encoding was used. In `2.7.1`, when `transfer_encoding` is not specified, the encoding of the message is respected. Related to: https://github.com/mikel/mail/commit/dead487e02f592d9058fd07deedcde39b569d18d However, what chosen for transfer encoding is not essential in these tests. To test more accurately, confirm that the decoded body instead.
-
由 yuuji.yaginuma 提交于
-
- 13 10月, 2018 2 次提交
-
-
由 Edouard CHIN 提交于
- Adding a Float as a duration to a datetime would result in the Float being rounded. Doing something like would have no effect because the 0.45 seconds would be rounded to 0 second. ```ruby time = DateTime.parse("2018-1-1") time += 0.45.seconds ``` This behavior was intentionally added a very long time ago, the reason was because Ruby 1.8 was using `Integer#gcd` in the constructor of Rational which didn't accept a float value. That's no longer the case and doing `Rational(0.45, 86400)` would now perfectly work fine. - Fixes #34008
-
由 Dylan Thacker-Smith 提交于
Ruby uses the original method name, so will show the __temp__ method name in the backtrace. However, in the common case the method name is compatible with the `def` keyword, so we can avoid the __temp__ method name in that case to improve the name shown in backtraces or TracePoint#method_id.
-
- 12 10月, 2018 7 次提交
-
-
由 Francesco Rodríguez 提交于
-
由 Jeremy Daer 提交于
Deprecate Unicode#downcase/upcase/swapcase.
-
由 yuuji.yaginuma 提交于
-
由 Francesco Rodríguez 提交于
-
由 Francesco Rodríguez 提交于
Use String methods directly instead.
-
由 Eileen Uchitelle 提交于
Check that options passed to the to_json are passed to all objects that respond to as_json.
-
由 Rafael França 提交于
Add test retries for railties
-
- 11 10月, 2018 8 次提交
-
-
由 Gannon McGibbon 提交于
-
由 Gannon McGibbon 提交于
-
由 Kasper Timm Hansen 提交于
[ci skip] Fix link to Concurrent::ThreadPoolExecutor docs
-
由 Orhan Toy 提交于
-
由 Ryuta Kamizono 提交于
Remove invalid magic comment [ci skip]
-
由 Yoshiyuki Kinjo 提交于
-
由 Eileen M. Uchitelle 提交于
Part 4: Multi db improvements, Basic API for connection switching
-
由 Eileen Uchitelle 提交于
This PR adds the ability to 1) connect to multiple databases in a model, and 2) switch between those connections using a block. To connect a model to a set of databases for writing and reading use the following API. This API supercedes `establish_connection`. The `writing` and `reading` keys represent handler / role names and `animals` and `animals_replica` represents the database key to look up the configuration hash from. ``` class AnimalsBase < ApplicationRecord connects_to database: { writing: :animals, reading: :animals_replica } end ``` Inside the application - outside the model declaration - we can switch connections with a block call to `connected_to`. If we want to connect to a db that isn't default (ie readonly_slow) we can connect like this: Outside the model we may want to connect to a new database (one that is not in the default writing/reading set) - for example a slow replica for making slow queries. To do this we have the `connected_to` method that takes a `database` hash that matches the signature of `connects_to`. The `connected_to` method also takes a block. ``` AcitveRecord::Base.connected_to(database: { slow_readonly: :primary_replica_slow }) do ModelInPrimary.do_something_thats_slow end ``` For models that are already loaded and connections that are already connected, `connected_to` doesn't need to pass in a `database` because you may want to run queries against multiple databases using a specific role/handler. In this case `connected_to` can take a `role` and use that to swap on the connection passed. This simplies queries - and matches how we do it in GitHub. Once you're connected to the database you don't need to re-connect, we assume the connection is in the pool and simply pass the handler we'd like to swap on. ``` ActiveRecord::Base.connected_to(role: :reading) do Dog.read_something_from_dog ModelInPrimary.do_something_from_model_in_primary end ```
-