aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | Add configuration to no-response probot pluginRafael França2018-09-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | | Merge pull request #34002 from gmcgibbon/fix_deeply_nested_scoped_rootRafael França2018-09-272-1/+17
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix optionally scoped root route unscoped access
| * | | | | | | | | | | Fix optionally scoped root route unscoped accessGannon McGibbon2018-09-272-1/+17
| |/ / / / / / / / / /
* | | | | | | | | | | Merge pull request #34006 from kamipo/remove_debug_codeRyuta Kamizono2018-09-281-10/+0
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Revert "record who created the node when $DEBUG is true"
| * | | | | | | | | | | Revert "record who created the node when $DEBUG is true"Ryuta Kamizono2018-09-281-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a1b72178714fbf0033fe076b7e51f57eff152bdd.
* | | | | | | | | | | | Merge pull request #34004 from simonc/constraints-call-matches-edge-caseRafael Mendonça França2018-09-272-1/+28
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing an edge case when using objects as constraints
| * | | | | | | | | | | | Fixing an edge case when using objects as constraintsSimon Courtois2018-09-272-1/+28
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes an issue when the following situation occurs. If you define a class like this class MyConstraint def call(*args) # for some reason this is defined end def matches?(*args) # checking the args end end and try to use it as a constraint get "/", to: "home#show", constraints: MyConstraint.new if its `matches?` method returns `false` there will be an error for the mapper will ask for the constraint arity, thinking it is a proc, lambda or method. This PR checks for the presence of the `arity` method on the constraint calling it only if present, preventing the error while keeping the basic behavior.
* / / / / / / / / / / / Extract `Arel.arel_node?` helper methodRyuta Kamizono2018-09-283-4/+7
|/ / / / / / / / / / /
* | | | | | | | | | | Remove `visit_Fixnum` and `visit_Bignum`Ryuta Kamizono2018-09-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Ruby 2.4 unified Fixnum and Bignum into Integer.
* | | | | | | | | | | Make `update_counters` preparableRyuta Kamizono2018-09-283-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` Topic Update All (0.4ms) UPDATE `topics` SET `topics`.`replies_count` = COALESCE(`topics`.`replies_count`, 0) + 1, `topics`.`updated_at` = '2018-09-27 18:34:05.068774' WHERE `topics`.`id` = ? [["id", 7]] ``` After: ``` Topic Update All (0.4ms) UPDATE `topics` SET `topics`.`replies_count` = COALESCE(`topics`.`replies_count`, 0) + ?, `topics`.`updated_at` = ? WHERE `topics`.`id` = ? [["replies_count", 1], ["updated_at", 2018-09-27 18:55:05 UTC], ["id", 7]] ```
* | | | | | | | | | | Merge pull request #33995 from Edouard-chin/ec-active-job-subset-argRafael França2018-09-273-2/+100
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add a way to check for subset of arguments when performing jobs:
| * | | | | | | | | | | Add a way to check for subset of arguments when performing jobs:Edouard CHIN2018-09-263-2/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When calling `assert_performed_with`/`assert_enqueued_with`, the +args+ needs to match exactly what the job get passed. Some jobs can have lot of arguments, or even a simple hash argument has many key. This is not convenient to test as most tests doesn't need to check if the arguments matches perfectly. This PR make it possible to only check if a subset of arguments were passed to the job.
* | | | | | | | | | | | Merge pull request #34003 from palkan/fix/cable-test-case-rails5-hackRafael França2018-09-271-6/+2
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Rails 5.0 workaround from ActionCable::Channel::TestCase
| * | | | | | | | | | | | Remove Rails 5.0 workaround from ActionCable::Channel::TestCaseVladimir Dementyev2018-09-271-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hack was merged from action-cable-testing gem by mistake. We don't need it in Rails 6. (cherry picked from commit 92030ec4b4309835ed0e792229984a1f0a044cef)
* | | | | | | | | | | | | Merge pull request #33986 from matt17r/patch-1Gannon McGibbon2018-09-271-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / |/| | | | | | | | | | | | Add missing rdoc +code+ tags [ci skip]
| * | | | | | | | | | | | Add missing rdoc +code+ tagsMatthew LS2018-09-261-1/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | 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
| | | | | | | | | | | | |