- 12 6月, 2018 3 次提交
-
-
由 Rafael Mendonça França 提交于
It mark the association as loaded and this can cause the object to be in an stale state.
-
由 Rafael França 提交于
Remove redundant accessors in AC test stub
-
由 Rafael Mendonça França 提交于
This also mark the association as loaded given we changed it in memory and avoid the next access to the reader to make a query to the databse.
-
- 11 6月, 2018 5 次提交
-
-
由 Rafael Mendonça França 提交于
Use hash lookup for deleting existing associations from `target`
-
由 Rafael França 提交于
Allow to override the full_message error format
-
由 Aaron Patterson 提交于
Use Rack to generate query information under test
-
由 Ryuta Kamizono 提交于
This regression was caused by #30995 due to `Hash#fetch` won't invoke default proc. Just revert the change since #30995 is completely fixed by e9c16536. Fixes #33048.
-
- 10 6月, 2018 2 次提交
-
-
由 Ryuta Kamizono 提交于
[ci skip]
-
由 yuuji.yaginuma 提交于
Follow up of 3915a470.
-
- 09 6月, 2018 10 次提交
-
-
由 Ryuta Kamizono 提交于
Add/Remove `require`
-
由 yuuji.yaginuma 提交于
If use Node.js v10.4.0, ujs's build will result in an error, so temporarily fix the version to v10.3.0. Ref: https://travis-ci.org/rails/rails/jobs/389960856
-
由 Rafael França 提交于
Add `ActiveSupport::CompareWithRange` to API docs
-
由 Rafael França 提交于
Refactor actioncable's tests
-
由 Rafael França 提交于
Remove extra `include ActiveSupport::Testing::MethodCallAssertions`
-
由 Rafael Mendonça França 提交于
Action Cable owns database connection, not Active Record
-
由 bogdanvlviv 提交于
Include `ActiveSupport::Testing::MethodCallAssertions` in `railties/test/isolation/abstract_unit.rb` Related to #33102
-
由 bogdanvlviv 提交于
It includes via `require "abstract_unit"`.
-
由 bogdanvlviv 提交于
Remove all `include ActiveSupport::Testing::MethodCallAssertions` in actioncable's tests since we can do it only in `ActionCable::TestCase` in order to prevent code duplication. We use the same approach for other modules of Rails.
-
由 bogdanvlviv 提交于
We have defined `ActionCable::TestCase` in `actioncable/test/test_helper.rb` that we can use in order to prevent code duplication and build common interface for actioncable's test.
-
- 08 6月, 2018 9 次提交
-
-
由 Aaron Patterson 提交于
`to_query` sorts parameters before encoding them. This causes a round tripping issue as noted here: https://github.com/rails/rails/issues/23997#issuecomment-328297933 https://github.com/rails/rails/issues/10529#issuecomment-328298109 https://github.com/rails/rails/pull/30558 Unfortunately, that method is being used to generate cache keys, so its results need to be stable: https://github.com/rails/rails/commit/10dec0e65e1f4d87f411b4361045eba86b121be9 However, the test harness is only using `to_query` to encode parameters before sending them to the controller so the "cache key" usecase doesn't apply here. This commit adds a test that demonstrates the round trip problems and changes the serialization strategy to use Rack for encoding the parameters rather than `to_query`.
-
由 George Claghorn 提交于
Refactor activestorage/test/models/attached_test.rb
-
由 bogdanvlviv 提交于
Don't include `ActiveJob::TestHelper` since there is no test that uses it. Ensure removing of overridden User's methods. Related to https://github.com/rails/rails/pull/33085#issuecomment-395548563 Module#remove_method is private in Ruby 2.4. Related to fd0bd1bf
-
由 George Claghorn 提交于
This reverts commit 07c035e7, reversing changes made to 7b33903d.
-
由 George Claghorn 提交于
Refactor activestorage/test/models/attached_test.rb
-
由 George Claghorn 提交于
Fix example of `index_with`
-
由 bogdanvlviv 提交于
Since it is documented in the guides http://edgeguides.rubyonrails.org/active_support_core_extensions.html#include-questionmark-and-cover-questionmark we can add it to API docs http://edgeapi.rubyonrails.org too. [ci skip]
-
由 bogdanvlviv 提交于
- Clarify executor of `public_send`. - Do not wrap `Interval.all_day` into [] since an array is expected as a returned value. Related to #32523. [ci skip]
-
由 bogdanvlviv 提交于
Don't include `ActiveJob::TestHelper` since there is no test that uses it. Ensure removing of overridden User's methods. Don't use `send` to execute `remove_method` since it is public. Related to fd0bd1bf
-
- 07 6月, 2018 7 次提交
-
-
由 bogdanvlviv 提交于
`activesupport/test/logger_test.rb` requires `tmpdir`. `activesupport/test/multibyte_test_helpers.rb` requires `filutils`, `open-uri`, and `tmpdir`.
-
由 bogdanvlviv 提交于
- `activesupport/multibyte_normalization_conformance_test.rb` `fileutils`, `tmpdir`, and `open-uri` are unused since c245ca30, c245ca30, and 7d7c2d13 in accordance. - `activesupport/test/multibyte_conformance_test.rb` `tmpdir`, and `open-uri` are unused since c245ca30, and 7d7c2d13 in accordance. Remove using of `fileutils` since c245ca30. - `activesupport/test/multibyte_grapheme_break_conformance_test.rb` `fileutils`, `tmpdir`, and `open-uri` are unused since c245ca30, c245ca30, and 7d7c2d13 in accordance.
-
由 George Claghorn 提交于
-
由 Ryuta Kamizono 提交于
If `eager_loading` is true, `apply_join_dependency` force applies LIMIT/OFFSET before JOINs by `limited_ids_for` to keep parent records count. But for aggregation queries, LIMIT/OFFSET should be applied after aggregations the same as SQL semantics. And also, we could not replace SELECT list by `limited_ids_for` when a query has a GROUP BY clause. It had never been worked since it will causes generating invalid SQL for MySQL, PostgreSQL, and probably most backends. ``` % ARCONN=postgresql be ruby -w -Itest test/cases/calculations_test.rb -n test_group_by_with_limit Using postgresql Run options: -n test_group_by_with_limit --seed 20925 # Running: E Error: CalculationsTest#test_group_by_with_limit: ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "posts.id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT DISTINCT "posts"."id", "posts"."type" AS alias_0 FRO... ^ : SELECT DISTINCT "posts"."id", "posts"."type" AS alias_0 FROM "posts" LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" GROUP BY "posts"."type" ORDER BY "posts"."type" ASC LIMIT $1 ``` Fixes #8103. Closes #27249.
-
由 Ryuta Kamizono 提交于
In `_create_record`, explicit `transaction` block requires rollback handling manually when `insert_record` is failed. We need to handle it in `_create_record`, not in `insert_record`, since our test cases expect a record added to target and returned even if `insert_record` is failed, Closes #31488.
-
由 Ryuta Kamizono 提交于
Follow up of #32952.
-
由 Rafael França 提交于
Fix force equality checking not to break the serialized attribute with Array
-
- 06 6月, 2018 4 次提交
-
-
由 Ryuta Kamizono 提交于
Child joins should be aliased when merging relations
-
由 Chalo Fernandez 提交于
Rails 5.2 does not alias child joins, causing an error about duplicated table/fields: Example: Using some code like: `Post.joins(:author, :categorizations).merge(Author.select(:id)).merge(Categorization.joins(:author))` *Before this fix:* ` SELECT ... FROM "posts" INNER JOIN "authors" ON ... INNER JOIN "authors" ON ... ` *After this fix:* ` SELECT ... FROM "posts" INNER JOIN "authors" ON ... INNER JOIN "authors" "authors_categorizations" ON ... ` Before 5.2, Rails aliased the joins, but wrongfully transformed them into a LEFT OUTER JOIN. This fix will keep them as INNER JOINS, but make sure child joins are aliased, to avoid errors.
-
由 Matthew Draper 提交于
PERF: avoid allocating column names where possible
-