- 10 6月, 2018 3 次提交
-
-
由 Koki Ryu 提交于
names. Lambda should be passed to use this option. Example: date_select('user_birthday', '', start_year: 1998, end_year: 2000, year_format: ->year { "Heisei #{year - 1988}" }) The HTML produced: <select id="user_birthday__1i" name="user_birthday[(1i)]"> <option value="1998">Heisei 10</option> <option value="1999">Heisei 11</option> <option value="2000">Heisei 12</option> </select> /* The rest is omitted */
-
由 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 8 次提交
-
-
由 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 5 次提交
-
-
由 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
-
由 Sam 提交于
When requesting columns names from database adapters AR:Result would dup/freeze column names, this prefers using fstrings which cuts down on repeat allocations Attributes that are retained keep these fstrings around for the long term Note, this has the highest impact on "short" result sets, eg: Topic.first where you can void allocating the number of columns * String.
-
- 05 6月, 2018 4 次提交
-
-
由 Eileen M. Uchitelle 提交于
Migrations will raise an exception if there are multiple column defin…
-
由 Eileen M. Uchitelle 提交于
Fix testing guide typo
-
由 Ryuta Kamizono 提交于
Correct default value of `unknown_asset_fallback` [ci skip]
-
由 James Adam 提交于
`Rails.application.config.assets.unknown_asset_fallback` now defaults to `false` in an unmodified Rails application. [ci skip]
-
- 04 6月, 2018 3 次提交
-
-
由 Ryuta Kamizono 提交于
Should be done before `before_add` callbacks.
-
由 yuuji.yaginuma 提交于
`:nodoc:` is specified, but unfortunately, it is exposed in the API doc. http://edgeapi.rubyonrails.org/classes/Enumerable.html#method-i-_original_sum_with_required_identity If the method of the `alias` destination is public, the specification of `:nodoc:` does not seem to work.
-
由 George Claghorn 提交于
-