aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] document collection_caching.rbschneems2018-09-191-0/+35
|
* Merge pull request #33902 from bogdanvlviv/related-to-31727Ryuta Kamizono2018-09-171-1/+1
|\ | | | | Fix deprecation warning of `ActiveRecord::Migrator.migrations_path=`
| * Fix deprecation warning of `ActiveRecord::Migrator.migrations_path=`bogdanvlviv2018-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActiveRecord::Migrator.migrations_path=` was deprecated in #31727. This commit fixes: - `ActiveRecord::Migrator.migrations_path=` is deprecated, but not `ActiveRecord::Migrator.migrations_paths=` - Adds missing space The warning including this commit: ``` DEPRECATION WARNING: `ActiveRecord::Migrator.migrations_path=` is now deprecated and will be removed in Rails 6.0. You can set the `migrations_paths` on the `connection` instead through the `database.yml`. ``` Since it was deprecated in Rails 5.2 we should backport it to the `5-2-stable` branch. Related to #31727
* | Remove meaningless `ActiveRecord::MigrationContext.new(old_path)` in ensure ↵Ryuta Kamizono2018-09-172-16/+0
| | | | | | | | | | | | | | block `ActiveRecord::MigrationContext.new` just create an instance, doesn't have any side-effect.
* | Merge pull request #33898 from tkoyama1988/form_helpers_readableRyuta Kamizono2018-09-171-2/+2
|\ \ | | | | | | Improve readability in form helpers guide [ci skip]
| * | Improve readability in form helpers guide [ci skip]tkoyama19882018-09-171-2/+2
| | |
* | | Merge pull request #33901 from ↵Ryuta Kamizono2018-09-171-1/+1
|\ \ \ | |_|/ |/| | | | | | | | bogdanvlviv/fix-output-when-run-aj-integration-tests Print correct rake command on running AJ integration tests
| * | Print correct rake command on running AJ integration testsbogdanvlviv2018-09-171-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when executing `bundle exec rake test:integration` under `activejob/` derectory, it prints helpful info like: ``` (snip) *** rake aj:integration:async *** (snip) *** rake aj:integration:delayed_job *** (snip) ``` but there is no defined `:aj` scope in `activejob/Rakefile`, so I think output should be like: ``` (snip) *** rake test:integration:async *** (snip) *** rake test:integration:delayed_job *** (snip) ``` By the way `rake test:integration` doesn't work if execute it without prepending `bundle exec` to that command. It is probably what we should fix too.
* | Merge pull request #33899 from bogdanvlviv/follow-up-33405George Claghorn2018-09-161-0/+4
|\ \ | | | | | | Raise `ActiveRecord::InvalidForeignKey` in `before_destroy` for a blob if attachments exist
| * | Raise `ActiveRecord::InvalidForeignKey` in `before_destroy` for a blob if ↵bogdanvlviv2018-09-161-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | attachments exist The issue #32584 was fixed in #33405 by adding foreign key constraint to the `active_storage_attachments` table for blobs. This commit implements fix on app-level in order to ensure that users can't delete a blob with attachments even if they don't have the foreign key constraint. See a related discussion in the Campfire: https://3.basecamp.com/3076981/buckets/24956/chats/12416418@1236718899 Note that, we should backport it to `5-2-stable` too. Related to #33405
* | Merge pull request #33188 from larskanis/pg-1.1Yuji Yaginuma2018-09-172-2/+16
|\ \ | |/ |/| PostgreSQL: prepare for pg-1.1
| * Return empty array when casting malformed array stringsLars Kanis2018-06-231-1/+7
| | | | | | | | | | | | | | | | Parsing of malformed array strings without raising an error is deprecated in pg-1.1. It's therefore necessary to catch parser errors starting with pg-2.0. See also pg commit: https://bitbucket.org/ged/ruby-pg/commits/1b081326b346368e70c9c03ee7080e28d6b3a3dc
| * PostgreSQL: Prepare for pg-1.1.0Lars Kanis2018-05-271-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Version 1.1.0 deprecates exec and async_exec with a params array due to distinct semantics between calls with and without params array. Instead exec_params or async_exec_params shall be used. Moreover in pg-1.1.0 exec_* and prepare methods are aliases for async_exec_* and async_prepare. async_* methods don't need to be called explicit - they are the default now, when calling exec_* and prepare. For pg versions before 1.1, keep using async_exec.
* | Merge pull request #33895 from ↵Ryuta Kamizono2018-09-162-1/+9
|\ \ | | | | | | | | | | | | faucct/bugfix/preload_multiple_instances_of_same_record ActiveRecord::Associations::Preloader should preload all instances of the same record
| * | ActiveRecord::Associations::Preloader should preload all instances of the ↵Nikita Sokolov2018-09-162-1/+9
| | | | | | | | | | | | same record
* | | Merge pull request #33893 from y-yagi/fix-av-ujs-build-chromedriverYuji Yaginuma2018-09-162-2/+2
|\ \ \ | | | | | | | | Fix av-ujs build
| * | | Load `chromedriver-helper.rb`yuuji.yaginuma2018-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bin shim provides by `chromedriver-helper` gem has renamed to `chromedriver-helper` since 2.0. https://github.com/flavorjones/chromedriver-helper/pull/58 Since bin of new name is set to driver path in `lib/chromedriver-helper.rb`, need to load it.
| * | | Bump `chromedriver-helper` to 2.0yuuji.yaginuma2018-09-161-1/+1
| | | |
* | | | Use table name qualified column name for update countersRyuta Kamizono2018-09-162-9/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | MySQL supports JOINs to UPDATE, so if column name isn't qualified by table name, it would cause an ambiguous error: ``` Mysql2::Error: Column 'integer' in field list is ambiguous: UPDATE `pets` INNER JOIN `toys` ON `toys`.`pet_id` = `pets`.`pet_id` SET `integer` = COALESCE(`integer`, 0) + 1 WHERE `toys`.`name` = ? ```
* | | Extract `{update,delete}_all_test.rb` from `persistence_test.rb` and ↵Ryuta Kamizono2018-09-164-335/+347
| | | | | | | | | | | | | | | | | | | | | | | | `relations_test.rb` `persistence_test.rb` and `relations_test.rb` have too many lines, so I'd like to extract relation around tests to dedicated files before newly test added.
* | | Unlock pg versonyuuji.yaginuma2018-09-152-5/+5
| | | | | | | | | | | | | | | Get a warning about `async_exec`, but it seems that build has passed through the fix of https://bitbucket.org/ged/ruby-pg/commits/be48d118eeedbf6b6a1f0aa14749ab97fc22065c.
* | | Bump marcel for significant gem size reductionGeorge Claghorn2018-09-141-1/+1
| | |
* | | Merge pull request #33878 from kamipo/fallback_to_unprepared_statementRyuta Kamizono2018-09-155-7/+19
|\ \ \ | | | | | | | | Fallback to unprepared statement only when bind params limit is exceeded
| * | | Fallback to unprepared statement only when bind params limit is exceededRyuta Kamizono2018-09-145-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up and/or an alternative of #33844. Unlike #33844, this would attempt to construct unprepared statement only when bind params limit (mysql2 65535, pg 65535, sqlite3 249999) is exceeded. I only defined 65535 as the limit, not defined 249999 for sqlite3, since it is an edge case, I'm not excited to add less worth extra code.
* | | | Add test for `config.active_storage.routes_prefix`yuuji.yaginuma2018-09-151-0/+18
| |/ / |/| | | | | | | | Follow up #33883.
* | | Merge pull request #33883 from ↵George Claghorn2018-09-145-12/+27
|\ \ \ | | | | | | | | | | | | | | | | cbisnett/active_storage_route_prefix_configuration Configure Active Storage route prefix
| * | | Configure Active Storage route prefixChris Bisnett2018-09-145-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications can configure the route prefix prepended to the Active Storage routes. By default this maintains the previous prefix `/rails/active_storage` but supports custom prefixes. Before this change the route for serving blobs is fixed to `/rails/active_storage/blobs/:signed_id/*filename`. After this change it's possible to configure the route to something like `/files/blobs/:signed_id/*filename`.
* | | | Update associations.rb API documentation [ci skip] (#33857)Lucas Brandt2018-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update association_basics.md [ci skip] Addresses issue #33599 * Update associations.rb API documentation [ci skip] Additional detail for documentation of `belongs_to` `association=(associate)` * Update association_basics.md [ci skip] Reverts misplaced documentation comment
* | | | Merge pull request #33884 from printercu/patch-3Ryuta Kamizono2018-09-151-10/+10
|\ \ \ \ | |/ / / |/| | | [ci skip] Fix documentation for Response#content_type
| * | | [ci skip] Fix documentation for Response#content_typeprintercu2018-09-141-10/+10
|/ / /
* | | Add `:redis_cache_store` to `config.cache_store` options [ci skip]yuuji.yaginuma2018-09-141-1/+1
| | |
* | | Merge pull request #33879 from yahonda/another_33876Ryuta Kamizono2018-09-143-3/+3
|\ \ \ | | | | | | | | Remove mysql2 gem version requirement "< 0.6.0"
| * | | Remove mysql2 gem version requirement "< 0.6.0"Yasuo Honda2018-09-143-3/+3
| | | | | | | | | | | | | | | | Suggested at https://github.com/rails/rails/pull/33876#issuecomment-421176221
* | | | SQLite3: Support multiple args function for expression indexesRyuta Kamizono2018-09-144-23/+28
|/ / / | | | | | | | | | | | | Follow up #33874. Related #23393.
* | | Make sure the flash method is defined even if helpers are not presentRafael Mendonça França2018-09-132-6/+11
| | |
* | | Enable `sudo` only in the required buildyuuji.yaginuma2018-09-141-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, PostgreSQL + Ruby 2.5.1 build has failed. https://travis-ci.org/rails/rails/jobs/427502723#L2940-L2942 https://travis-ci.org/rails/rails/jobs/427496382#L2921-L2923 https://travis-ci.org/rails/rails/jobs/427470858#L2921-L2923 This is because PostgreSQL server abnormally terminates when ramfs becomes full. Ref: https://travis-ci.org/rails/rails/jobs/427960998#L7614 This occurs since d54d0c95750e2693da495b75ac5fa0280253972d. In d54d0c95750e2693da495b75ac5fa0280253972d, `sudo` is used in preprocessing for setting MySQL. In Travis, even if specified `sudo: false`, when using `sudo` in build, sudo-enabled infrastructure is used. https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system As container-based infrastructure was changed to sudo-enabled infrastructure, the disk settings etc were also changed, it seems that this phenomenon occurred. This can also be handled by extending ramfs(https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213). However, using sudo-enabled in all builds affects the execution time of build, so I think that it is good to use sudo-enabled only in the necessary builds.
* | | Merge pull request #33874 from gkemmey/sqlite-expression-indexesRafael França2018-09-135-6/+70
|\ \ \ | |/ / |/| | SQLite3 adapter supports expression indexes
| * | SQLite3 adapter supports expression indexesgkemmey2018-09-135-6/+70
| | |
* | | Merge pull request #33875 from yahonda/drop_mysql_51_supportRyuta Kamizono2018-09-142-2/+2
|\ \ \ | | | | | | | | | | | | | | | | Bump MySQL version requirement to 5.5.8 in the template files [ci skip]
| * | | Bump MySQL version requirement to 5.5.8 in the template filesYasuo Honda2018-09-132-2/+2
| | | | | | | | | | | | | | | | Follow-up #33853
* | | | Merge pull request #33800 from aeroastro/feature/doc-change-for-blankXavier Noria2018-09-131-1/+1
|\ \ \ \ | | | | | | | | | | Improve API document on Object#blank?
| * | | | Revert falsey with example reorderedTakumasa Ochi2018-09-141-2/+2
| | | | |
| * | | | Improve API document on Object#blank?Takumasa Ochi2018-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Introduce `falsey` to represent both `nil` and `false`. * Keep consistent order between abstract description and examples.
* | | | | Merge pull request #33569 from eric-hemasystems/conditional-flash-helperRafael França2018-09-132-3/+13
|\ \ \ \ \ | |_|_|/ / |/| | | | Conditionally use `helper_method` in Flash concern
| * | | | Conditionally use `helper_method` in Flash concernEric Anderson2018-08-092-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was attempting to use the `flash` functionality in a `Metal` controller. When including the `flash` concern I received the following error: NoMethodError: undefined method `helper_method'.... Either: - `AbstractController::Helpers` should be a dependency of `ActionController::Flash` - `ActionController::Flash` should not require the existence of `AbstractController::Helpers`. Since my use case (set a flash and redirect) has no need for the helper method and that is a common use case, making the dependency conditional seemed the better option. NOTE: This is similar to issue #21067 only the error is within Rails itself while that issue had the error within Devise.
* | | | | Merge pull request #33871 from gregmolnar/database_configurationsEileen M. Uchitelle2018-09-131-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | add `any?` to DatabaseConfigurations
| * | | | add `any?` to DatabaseConfigurationsGreg Molnar2018-09-131-0/+1
| | | | |
* | | | | Merge pull request #33378 from numbata/subclass-redefine-autosave-callbacksRafael Mendonça França2018-09-134-1/+32
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Allow subclasses to redefine autosave callbacks for associated records
| * | | | | Allow subclasses to redefine autosave callbacks for associated recordsAndrey Subbota2018-07-274-1/+32
| | | | | |
* | | | | | Merge pull request #33853 from yahonda/use_utf8mb4_only_if_availableJeremy Daer2018-09-133-4/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | Validate if `utf8mb4` character set and longer index key prefix is supported