aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make `update_all` preparableRyuta Kamizono2018-09-282-2/+18
| | | | | | | | | | | | | | Before: ``` Pet Update All (0.8ms) UPDATE `pets` LEFT OUTER JOIN `toys` ON `toys`.`pet_id` = `pets`.`pet_id` SET `pets`.`name` = 'Bob' WHERE `toys`.`name` = ? [["name", "Bone"]] ``` After: ``` Pet Update All (1.1ms) UPDATE `pets` LEFT OUTER JOIN `toys` ON `toys`.`pet_id` = `pets`.`pet_id` SET `pets`.`name` = ? WHERE `toys`.`name` = ? [["name", "Bob"], ["name", "Bone"]] ```
* Merge pull request #33979 from lzap/masterRafael França2018-09-272-0/+26
|\ | | | | Added ActionController::Parameters.each_value methods
| * Added ActionController::Parameters.each_value methodLukas Zapletal2018-09-272-0/+26
| |
* | Merge pull request #31604 from fatkodima/reverting-transactionEileen M. Uchitelle2018-09-277-5/+86
|\ \ | | | | | | Fix `transaction` reverting for migrations
| * | Fix `transaction` reverting for migrationsfatkodima2018-09-267-5/+86
| | | | | | | | | | | | [fatkodima & David Verhasselt]
* | | Merge pull request #33994 from gmcgibbon/rails_g_model_migrations_pathsRafael França2018-09-274-0/+32
|\ \ \ | | | | | | | | Add migrations_paths option to model generator
| * | | Add migrations_paths option to model generatorGannon McGibbon2018-09-274-0/+32
|/ / /
* | | Avoid extra touch queries when counter cache is updatedRyuta Kamizono2018-09-272-6/+16
| | | | | | | | | | | | Since counter cache handles touch option too.
* | | Refactor counter cache to extract `decrement_counters_before_last_save` on ↵Ryuta Kamizono2018-09-272-48/+31
| | | | | | | | | | | | the belongs_to association
* | | Merge pull request #34001 from dark-panda/ignore-psqlrc-when-using-psqlRyuta Kamizono2018-09-272-4/+4
|\ \ \ | | | | | | | | Use -X when loading structure.sql via psql
| * | | Use -X when loading structure.sql via psqlJ Smith2018-09-272-4/+4
|/ / /
* | | Merge pull request #33997 from MatthiasWinkelmann/pg_dumpRyuta Kamizono2018-09-272-8/+8
|\ \ \ | | | | | | | | Removed invalid -X flag for pg_dump, fixes #33996
| * | | Removed invalid -X flag for pg_dumpMatthias Winkelmann2018-09-272-8/+8
| | | |
* | | | Add ActionCable::Channel::TestCaseVladimir Dementyev2018-09-263-0/+464
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionCable::Channel::TestCase provides an ability to unit-test channel classes. There are several reasons to write unit/functional cable tests: - Access control (who has access to the channel? who can perform action and with which argument? - Frontend-less applications have no system tests at all–and we still need a way to test channels logic. See also #27191
* | | Merge pull request #33970 from rails/eager-url-helpersAaron Patterson2018-09-2610-36/+102
|\ \ \ | |/ / |/| | Eagerly build the routing helper module after routes are committed
| * | Merge branch 'master' into eager-url-helpersAaron Patterson2018-09-2676-174/+276
| |\ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Remove force parent loading when counter cache child is created/destroyed Raise an error when loading all fixtures from nil fixture_path Revert "Remove `counter_cache_target` which is no longer called" Update counter cache in memory if parent target is existed If association is a hash-like object preloading fails Use the same option for create database statements between Raketask and travis.rb Fix "warning: shadowing outer local variable - config" Remove `counter_cache_target` which is no longer called Fix more offences Change the empty block style to have space inside of the block Fix a content_for test description Stringify database configurations Improve error message when assign wrong attributes to model
* | | Merge pull request #30676 from artofhuman/import-assert-attrs-error-messageRafael França2018-09-262-2/+4
|\ \ \ | | | | | | | | Improve error message when assign wrong attributes to model
| * | | Improve error message when assign wrong attributes to modelSemyon Pupkov2018-04-282-2/+4
| | | |
* | | | Merge pull request #33983 from gmcgibbon/raise_if_fixture_path_blankRafael França2018-09-263-0/+21
|\ \ \ \ | | | | | | | | | | Raise an error when loading all fixtures from nil fixture_path
| * | | | Raise an error when loading all fixtures from nil fixture_pathGannon McGibbon2018-09-263-0/+21
| | | | | | | | | | | | | | | | | | | | [Gannon McGibbon + Max Albrecht]
* | | | | Merge pull request #31819 from bpohoriletz/masterEileen M. Uchitelle2018-09-262-4/+29
|\ \ \ \ \ | | | | | | | | | | | | If association is a hash-like object preloading fails
| * | | | | If association is a hash-like object preloading failsBohdan Pohorilets2018-09-262-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you pass a hash-like object to preload associations (for example ActionController::Parameters) preloader will fail with the ArgumentError. This change allows passing objects that may be converted to a Hash or String into a preloader
* | | | | | Remove force parent loading when counter cache child is created/destroyedRyuta Kamizono2018-09-262-7/+7
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `association.increment_counters` and `association.decrement_counters` works regardless of parent target is loaded or not. Related 52e11e462f6114a4d12225c639c5f501f0ffec7a.
* | | | | Revert "Remove `counter_cache_target` which is no longer called"Ryuta Kamizono2018-09-262-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 376ffe0ea2e59dc51461122210729c05a10fb443. Since 38fae1f, `association.increment_counters` is called without inflated parent target if inverse_of is disabled. In that case, that commit would cause extra queries to inflate parent.
* | | | | Update counter cache in memory if parent target is existedRyuta Kamizono2018-09-262-10/+35
|/ / / / | | | | | | | | | | | | Fixes #19550.
* | | | Merge pull request #33987 from yahonda/specify_database_characterset_at_travisRyuta Kamizono2018-09-261-4/+4
|\ \ \ \ | | | | | | | | | | Use the same option for create database statements
| * | | | Use the same option for create database statements between Raketask and ↵Yasuo Honda2018-09-261-4/+4
|/ / / / | | | | | | | | | | | | travis.rb
* | | | Fix "warning: shadowing outer local variable - config"yuuji.yaginuma2018-09-261-2/+2
| | | |
* | | | Merge pull request #33968 from gmcgibbon/stringify_db_configurationsRafael França2018-09-253-2/+30
|\ \ \ \ | | | | | | | | | | Stringify database configurations
| * | | | Stringify database configurationsGannon McGibbon2018-09-243-2/+30
| | | | |
* | | | | Merge pull request #33975 from JuanitoFatas/jf.fix-test-nameRafael França2018-09-251-1/+1
|\ \ \ \ \ | | | | | | | | | | | | [CaptureHelperTest] Fix a content_for test description
| * | | | | Fix a content_for test descriptionJuanito Fatas2018-09-251-1/+1
| | | | | |
* | | | | | Remove `counter_cache_target` which is no longer calledRyuta Kamizono2018-09-261-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `counter_cache_target` is called only when updated counter cache in replacing target, but it was already removed at #33913.
* | | | | | Fix more offencesRafael Mendonça França2018-09-253-3/+3
| | | | | |
* | | | | | Change the empty block style to have space inside of the blockRafael Mendonça França2018-09-2560-141/+142
| | | | | |
| | | | * | Routes from Engine Railties should not be an infinite loopAaron Patterson2018-09-262-2/+10
| | | | | |
| | | | * | Eager load supports individual filesAaron Patterson2018-09-262-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Also we want to eager load routes before anything else.
| | | | * | Allow helpers to be deferred until the routes have been finalizedAaron Patterson2018-09-252-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveStorage::BaseController subclasses ActionController::Base. ActionController::Base has an "inherited" hook set that includes the routing helpers to any subclass of AC::Base. Since ActiveStorage::BaseController is a subclass of AC::Base, it will get routing helpers included automatically. Unfortunately, when the framework is eagerly loaded, ActiveStorage::BaseController is loaded *before* the applications routes are loaded which means it attempts to include an "in flight" module so it gets an exception. This commit allows a class that's interested in being extended with routing helpers register itself such that when the routes are finalized, it will get the helpers included. If the routes are already finalized, then the helpers get included immediately.
| | | | * | Eagerly build the routing helper module after routes are committedAaron Patterson2018-09-257-27/+62
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit eagerly builds the route helper module after the routes have been drawn and finalized. This allows us to cache the helper module but not have to worry about people accessing the module while route definition is "in-flight", and automatically deals with cache invalidation as the module is regenerated anytime someone redraws the routes. The restriction this commit introduces is that the url helper module can only be accessed *after* the routes are done being drawn. Refs #24554 and #32892
* | | | | Merge pull request #33974 from rails/remove-catch-all-from-amAaron Patterson2018-09-251-17/+7
|\ \ \ \ \ | | | | | | | | | | | | This patch removes deprecated catch-all routes from AM
| * | | | | This patch removes deprecated catch-all routes from AMAaron Patterson2018-09-241-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | It also removes a monkey patch from AM::Base
* | | | | | Merge pull request #33973 from rails/remove-catch-allAaron Patterson2018-09-2519-78/+296
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove deprecated catch-all route in the AV tests
| * | | | | | make bot happyAaron Patterson2018-09-244-9/+9
| | | | | | |
| * | | | | | Add hack to deal with warningsAaron Patterson2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should be able to remove this once the catch-all route is gone from AP
| * | | | | | Remove deprecated catch-all route in the AV testsAaron Patterson2018-09-2419-78/+296
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes a deprecated catch-all route in the AV tests. It defines and includes the necessary routes for each test such that we don't need the catch-all anymore. This also helps push us toward #33970
* | | | | | Merge pull request #33977 from marshall-lee/abandon-top-supportRyuta Kamizono2018-09-2510-27/+4
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Abandon TOP support.
| * | | | | Abandon TOP support.Vladimir Kochnev2018-09-2510-27/+4
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially, `TOP` was introduced to support `limit` for MSSQL database. Unlike PostgreSQL/MySQL/SQLite, MSSQL does not have native `LIMIT`/`OFFSET` support. The commit adding `TOP` is 1a246f71616cf246a75ef6cbdb56032e43d4e643. However, it figured out that `TOP` implementation was weak and it's not sufficient to also support `OFFSET`, then `TOP` was substituted with `ROW_NUMBER()` subquery in be48ed3071fd6524d0145c4ad3faeb4aafe3eda3. This is a well known trick in MSSQL - https://stackoverflow.com/questions/2135418/equivalent-of-limit-and-offset-for-sql-server. So now we don't need this `visit_Arel_Nodes_Top` at all. It does nothing useful but also adds an extra space after `SELECT` when `LIMIT` is being used for **any** database.
* | | | | Merge pull request #33953 from wagurano/guides_markdown_custom_header_idRafael França2018-09-242-2/+7
|\ \ \ \ \ | | | | | | | | | | | | Fix rails guides markdown.rb and renderer.rb to use custom header id
| * | | | | Fix rails guides markdown.rb and renderer.rb to use custom header idwagurano2018-09-232-2/+7
| | | | | |
* | | | | | Merge pull request #33964 from pskl/masterRafael França2018-09-241-1/+1
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Improve phrasing of one sentence in the contributing guide