aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CI against MariaDB 10.3Yasuo Honda2018-06-012-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - MariaDB 10.3.7 is the first GA release https://mariadb.com/kb/en/library/mariadb-1037-release-notes/ - MariaDB 10.3 translates `LENGTH()` to `OCTET_LENGTH()` function https://mariadb.com/kb/en/library/sql_modeoracle-from-mariadb-103/ > MariaDB translates LENGTH() to OCTET_LENGTH() - MySQL does NOT translate `LENGTH()` to `OCTET_LENGTH()` However, it translates `OCTET_LENGTH()` to `LENGTH()` Here are generated schema dumps of this test to show the differences between MySQL and MariaDB: * MySQL 8.0 (Server version: 8.0.11 MySQL Community Server - GPL) ```ruby create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t| t.string \"name\" t.virtual \"upper_name\", type: :string, as: \"upper(`name`)\" t.virtual \"name_length\", type: :integer, as: \"length(`name`)\", stored: true t.virtual \"name_octet_length\", type: :integer, as: \"length(`name`)\", stored: true end ``` * Maria DB 10.3 (Server version: 10.3.7-MariaDB-1:10.3.7+maria~bionic-log mariadb.org binary distribution) ```ruby create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t| t.string \"name\" t.virtual \"upper_name\", type: :string, as: \"ucase(`name`)\" t.virtual \"name_length\", type: :integer, as: \"octet_length(`name`)\", stored: true t.virtual \"name_octet_length\", type: :integer, as: \"octet_length(`name`)\", stored: true end ```
* Merge pull request #33012 from bogdanvlviv/fix-discard_on-and-retry_on-docRyuta Kamizono2018-05-291-4/+4
|\ | | | | | | | | Fix name of the second parameter of block executed by `discard_on` and `retry_on` [ci skip]
| * Fix name of the second parameter of block executed by `discard_on` and ↵bogdanvlviv2018-05-291-4/+4
|/ | | | | | | | `retry_on` [ci skip] Follow up #32854 and ba07b5fc12a740d41d288bea6347f15f4948483c.
* Merge pull request #32952 from mechanicles/32940-fixRyuta Kamizono2018-05-295-3/+35
|\ | | | | | | Fix parent record should not get saved with duplicate children records
| * Fix parent record should not get saved with duplicate children recordsSantosh Wadghule2018-05-285-3/+35
| | | | | | | | - Fixes #32940
* | Fix referenceGeorge Claghorn2018-05-281-1/+1
| |
* | Verify integrity after chunked downloadGeorge Claghorn2018-05-285-3/+24
| |
* | Ensure casting by boolean attribute when queryingRyuta Kamizono2018-05-293-43/+47
| | | | | | | | | | | | | | | | | | | | | | `QueryAttribute#value_for_database` calls only `type.serialize`, and `Boolean#serialize` is a no-op unlike other attribute types. It caused the issue #32624. Whether or not `serialize` will invoke `cast` is undefined in our test cases, but it actually does not work properly unless it does so for now. Fixes #32624.
* | Merge pull request #33005 from mechanicles/fix-sentenceRafael França2018-05-281-1/+1
|\ \ | | | | | | Fix sentence [ci skip]
| * | Fix sentence [ci skip]Santosh Wadghule2018-05-281-1/+1
| | |
* | | Hide Active Storage migration installation task (#33007)utilum2018-05-281-0/+3
| | | | | | | | | Resolves #33006
* | | Merge pull request #33003 from bogdanvlviv/fix-actioncable-test-changed-in-32727Ryuta Kamizono2018-05-281-1/+1
|\ \ \ | | | | | | | | Fix actionable test's assertion
| * | | Fix actionable test's assertionbogdanvlviv2018-05-281-1/+1
| |/ / | | | | | | | | | | | | Pull Request #32727 changed "mocha expects" in favor of `MethodCallAssertions`. This commit fixes assertion that became less strict after the PR.
* | | Merge pull request #33004 from nlpgo/masterRyuta Kamizono2018-05-282-5/+5
|\ \ \ | | | | | | | | Fix: Arel Postgresql visitor generates invalid SQL for GROUPING SETS.
| * | | Fix: Arel Postgresql visitor generates invalid SQL for GROUPING SETS.david2018-05-282-5/+5
| |/ /
* | | Merge pull request #33001 from utilum/update_et-orbiRyuta Kamizono2018-05-281-2/+2
|\ \ \ | |/ / |/| | Update et-orbi to latest version
| * | Update et-orbi to latest versionutilum2018-05-281-2/+2
|/ / | | | | | | avoids `warning: assigned but unused variable - tu`.
* | Remove unnecessary `with_default_enforce_utf8` methodyuuji.yaginuma2018-05-281-9/+0
| | | | | | | | | | Because the same method is defined in `FormWithTest` of the parent class. https://github.com/rails/rails/blob/fe9547b6fb60d92af181c8613166fa4322f8e307/actionview/test/template/form_helper/form_with_test.rb#L19..L26
* | Parse raw value only when a value came from user in numericality validatorRyuta Kamizono2018-05-282-3/+8
| | | | | | | | | | | | | | | | Since `parse_raw_value_as_a_number` may not always parse raw value from database as a number without type casting (e.g. "$150.55" as money format). Fixes #32531.
* | Fix that association's after_touch is not called with counter cacheRyuta Kamizono2018-05-273-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | Since #31405, using `#increment!` with touch option instead of `#touch` to touch belongs_to association if counter cache is enabled. It caused the regression since `#increment!` won't invoke after_touch callbacks even if touch option is given. To fix the regression, make `#increment!` invokes after_touch callbacks if touch option is given. Fixes #31559. Fixes #32408.
* | Fix inconsistent touching behavior between assigning and unassigningRyuta Kamizono2018-05-274-3/+29
| | | | | | | | | | | | | | | | | | | | | | On belongs_to with `touch: true` association, unassigned object is caused touching, but assigned object is not touched. And also, if primary key is customized, it will touch against the wrong target looked up by the customized key as primary key. This change ensures correctly touching consistently between assigning and unassigning.
* | Fix `belongs_to_counter_cache_after_update` to respect polymorphic type changeRyuta Kamizono2018-05-274-3/+21
| |
* | Avoid a subquery in updating counter cacheRyuta Kamizono2018-05-262-7/+8
| | | | | | | | Since UPDATE with a subquery doesn't work on MySQL.
* | Fix `belongs_to_counter_cache_after_update` to respect custom primary key ↵Ryuta Kamizono2018-05-262-1/+20
| | | | | | | | | | | | | | | | | | | | counter If belongs_to primary key is customized, the callback will update counters against the wrong target looked up by the customized key as primary key. We need to convert the customized key into an object that can be referred to as primary key.
* | Fix `different_target?` to respect custom primary key counterRyuta Kamizono2018-05-262-3/+13
| |
* | Eager loading won't mutate owner recordRyuta Kamizono2018-05-253-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #31575, `BelongsToAssociation#target=` replaces owner record's foreign key to fix an inverse association bug. But the method is not only used for inverse association but also used for eager loading/preloading, it caused some public behavior changes (#32338, #32375). To avoid any side-effect in loading associations, I reverted the overriding `#target=`, then introduced `#inversed_from` to replace foreign key in `set_inverse_instance`. Closes #32375.
* | Make force equality checking more strictly not to allow serialized attributeRyuta Kamizono2018-05-256-5/+32
| | | | | | | | | | | | | | | | | | | | | | Since #26074, introduced force equality checking to build a predicate consistently for both `find` and `create` (fixes #27313). But the assumption that only array/range attribute have subtype was wrong. We need to make force equality checking more strictly not to allow serialized attribute. Fixes #32761.
* | Merge pull request #32982 from ruralocity/update-dateandtime-calculations-docsGeorge Claghorn2018-05-241-2/+2
|\ \ | | | | | | Improve grammar for DateAndTime before? and after? calculations [ci skip]
| * | Improve grammar for DateAndTime before? and after? calculations [ci skip]Aaron Sumner2018-05-241-2/+2
| | |
* | | Merge pull request #32979 from eugeneius/stale_commentRyuta Kamizono2018-05-251-1/+1
|\ \ \ | |/ / |/| | Update stale issue comment to mention 5-2-stable
| * | Update stale issue comment to mention 5-2-stableEugene Kenny2018-05-241-1/+1
|/ / | | | | | | 5-2-stable is the release series that currently receives bug fixes.
* | Merge pull request #32976 from oamado/fix_doc_broken_linkGuillermo Iguaran2018-05-241-1/+1
|\ \ | | | | | | update README link: md instead rdoc
| * | update README link: md instead rdoc [ci skip]Oscar Amado2018-05-241-1/+1
|/ /
* | Merge pull request #32975 from oamado/fix_activejob_docGuillermo Iguaran2018-05-241-1/+1
|\ \ | | | | | | correct link to activejob readme [ci skip]
| * | correct link to activejob readme [ci skip]Oscar Amado2018-05-241-1/+1
|/ /
* | Merge pull request #32968 from utilum/shadowing_outer_variableGeorge Claghorn2018-05-231-8/+6
|\ \ | | | | | | Avoid 2.6 warning: shadowing outer local variable - list
| * | Avoid 2.6 warning: shadowing outer local variable - listutilum2018-05-231-8/+6
| | |
* | | Merge pull request #30406 from eliotsykes/reduce-spring-watch-callsRafael Mendonça França2018-05-231-6/+6
|\ \ \ | | | | | | | | | | | | Minimize Spring.watch calls
| * | | Minimize Spring.watch callsEliot Sykes2017-08-251-6/+6
| | | |
* | | | Merge pull request #32969 from utilum/enable_warningsRafael França2018-05-233-9/+9
|\ \ \ \ | |_|/ / |/| | | Enable warnings in all test tasks
| * | | Enable warnings in all test tasksutilum2018-05-233-9/+9
|/ / / | | | | | | | | | Also normalize AJ task use t, like all other Rails test tasks.
* | | Eager autoload mail gem when eager load is true (#32808)Samuel Cochran2018-05-232-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Eager autoload mail gem when eager load is true We had a production issue where our Sidekiq worker threads all became deadlocked while autoloading a file within the mail gem, required via ActionMailer, despite setting our Rails applicaiton to eager load. `Mail.eager_autoload!` exists and works great, ActionMailer just doesn't call it during eager loading. Adding it to the ActionMailer Railtie's eager_load_namespaces takes care of calling `Mail.eager_autoload!` during the `eager_load!` initializer. * 'Mail' isn't defined yet, use before_eager_load instead * Make sure mail is loaded * Move eager load of Mail into ActionMailer.eager_load! [Samuel Cochran + Rafael Mendonça França]
* | | Merge pull request #32967 from javan/ast/jpg-video-previewsJavan Makhmali2018-05-233-7/+7
|\ \ \ | | | | | | | | Change Active Storage’s video preview format from PNG to JPG
| * | | Change video preview format from PNG to JPGJavan Makhmali2018-05-233-7/+7
|/ / /
* | | Merge pull request #32882 from utilum/unnecessary_mockingEileen M. Uchitelle2018-05-235-39/+24
|\ \ \ | |_|/ |/| | remove unnecessary mocking in ActionCable tests
| * | remove unnecessary mocking in ActionCable testsutilum2018-05-225-39/+24
| | |
* | | Fix RDoc formatting: `+` doesn't work with space [ci skip]yuuji.yaginuma2018-05-231-1/+1
| | | | | | | | | | | | Follow up of #32958.
* | | Merge pull request #32822 from lxxxvi/improved_error_message_in_assert_changesRafael França2018-05-222-2/+4
|\ \ \ | | | | | | | | Clearer error message in assert_changes
| * | | Clearer error message in assert_changeslxxxvi2018-05-052-2/+4
| | | | | | | | | | | | | | | | When `to:` is passed to `assert_changes`, it now prints the well-known `"Expected: x\n Actual: y"` message. Before, the message only contained the actual value.
* | | | Merge pull request #32699 from printercu/patch-3Rafael França2018-05-221-1/+7
|\ \ \ \ | | | | | | | | | | Respect NODE_ENV when running `rails yarn:install`