aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Allow all ActiveJob assertion helper to accept Proc in their `only` kw:Edouard CHIN2018-11-214-4/+101
| | | | | | | | - That feature is useful to enqueue or assert that jobs got enqueued or performed based on dynamic conditions. We will be able to leverage that feature to fix all ActionMailer assertion helper issue when a Mailer define a custom delivery job (see next commit).
* Merge pull request #34498 from ThomBian/thombian/fix-opclass-parsingRyuta Kamizono2018-11-222-1/+13
|\ | | | | Fixing an issue when parsing an opclass by allowing indexed column in indexdef to be wrapped up by double quotes
| * Fixing an issue when parsing an opclass by allowing indexed columnThomas Bianchini2018-11-212-1/+13
|/ | | | | | | | in indexdef to be wrapped up by double quotes Fixes #34493. *Thomas Bianchini*
* Merge pull request #34491 from rails/fix-query-cache-on-multiple-connectionsEileen M. Uchitelle2018-11-212-4/+27
|\ | | | | Fix query cache for multiple connections
| * Fix query cache for multiple connectionsEileen Uchitelle2018-11-202-4/+27
| | | | | | | | | | | | | | | | | | | | Currently the query cache is only aware of one handler so once we added multiple databases switching on the handler we broke query cache for those reading connections. While #34054 is the proper fix, that fix is not straight forward and I want to make sure that the query cache isn't just broken for all other connections not in the main handler.
* | Remove odd spaces [ci skip]Ryuta Kamizono2018-11-211-2/+2
| |
* | Merge pull request #34489 from 6temes/add_slice_method_to_errorsRafael França2018-11-213-0/+39
|\ \ | | | | | | Add slice! method to ActiveModel::Errors
| * | Add slice! method to ActiveModel::ErrorsDaniel Lopez Prat2018-11-213-0/+39
| | |
* | | Merge pull request #34497 from 6temes/make_documentation_for_slice_more_explicitRafael França2018-11-201-2/+3
|\ \ \ | | | | | | | | Expand documentation for Hash#slice!
| * | | Improve documentation for Hash#slice!Daniel Lopez 👾2018-11-211-2/+3
| |/ /
* | | Merge pull request #34495 from ↵Eileen M. Uchitelle2018-11-202-2/+39
|\ \ \ | | | | | | | | | | | | | | | | rails/make-connection-handler-per-thread-not-per-fiber Make connection handler per thread instead of per fiber
| * | | Make connection handler per thread instead of per fiberEileen Uchitelle2018-11-202-2/+39
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The connection handler was using the RuntimeRegistry which kind of implies it's a per thread registry. But it's actually per fiber. If you have an application that uses fibers and you're using multiple databases, when you switch the connection handler to swap connections new fibers running on the same thread used to get a different connection id. This PR changes the code to actually use a thread so that we get the same connection. Fixes https://github.com/rails/rails/issues/30047 [Eileen M. Uchitelle, Aaron Patterson, & Arthur Neeves]
* | | Merge pull request #34494 from gmcgibbon/warn_root_conflictRafael França2018-11-203-7/+22
|\ \ \ | |/ / |/| | Stop using unnamed roots on conflict
| * | Raise an error on root route naming conflicts.Gannon McGibbon2018-11-203-7/+22
|/ / | | | | | | | | Raises an ArgumentError when multiple root routes are defined in the same context instead of assigning nil names to subsequent roots.
* | Merge pull request #33954 from ↵Aaron Patterson2018-11-204-3/+43
|\ \ | | | | | | | | | | | | febeling/inconsistent-assignment-has-many-through-33942 Fix handling of duplicates for `replace` on has_many-through
| * | Optimize difference and intersectionFlorian Ebeling2018-11-061-17/+9
| | |
| * | Rename union to intersectionFlorian Ebeling2018-11-063-3/+3
| | |
| * | Fix handling of duplicates for `replace` on has_many-throughFlorian Ebeling2018-11-064-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug in the handling of duplicates when assigning (replacing) associated records, which made the result dependent on whether a given record was associated already before being assigned anew. E.g. post.people = [person, person] post.people.count # => 2 while post.people = [person] post.people = [person, person] post.people.count # => 1 This change adds a test to provoke the former incorrect behavior, and fixes it. Cause of the bug was the handling of record collections as sets, and using `-` (difference) and `&` (union) operations on them indiscriminately. This temporary conversion to sets would eliminate duplicates. The fix is to decorate record collections for these operations, and only for the `has_many :through` case. It is done by counting occurrences, and use the record together with the occurrence number as element, in order to make them work well in sets. Given a, b = *Person.all then the collection used for finding the difference or union of records would be internally changed from [a, b, a] to [[a, 1], [b, 1], [a, 2]] for these operations. So a first occurrence and a second occurrence would be distinguishable, which is all that is necessary for this task. Fixes #33942.
* | | Merge pull request #34492 from alfonsojimenez/fix-typoVipul A M2018-11-201-1/+1
|\ \ \ | | | | | | | | Fix typo in development_dependencies_install.md [ci skip]
| * | | Fix typo in development_dependencies_install.md [ci skip]Alfonso Jiménez2018-11-201-1/+1
|/ / /
* | | Deprecate `event.end = Time.now` in favor of `event.finish!`Ryuta Kamizono2018-11-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Since #33449, `event.end = Time.now` is not used anymore and should use `event.finish!`. We can't use `deprecate :end=` in definition time in this module due to circular require in `active_support/deprecation/behaviors`.
* | | Merge pull request #22534 from evopark/masterRafael Mendonça França2018-11-194-3/+26
|\ \ \ | | | | | | | | | | | | ActionMailer: support overriding template name in multipart
| * | | ActionMailer: support overriding template name in multipartMarcus Ilgner2015-12-084-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit rendering in multipart blocks now also uses the template name from the options hash instead of always using the action name. So you can now write mail(template_name: template_name) do |format| format.text format.html end
* | | | Merge pull request #20865 from colavitam/only-except-behaviorRafael Mendonça França2018-11-192-2/+30
|\ \ \ \ | | | | | | | | | | | | | | | :only and :except are now chained for routing resource(s)
| * | | | :only and :except are now chained for routing resource(s)Michael Colavita2015-07-133-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow chaining the :only and :except options for routing resource(s). Previously, the following yielded routes for both show and destroy: resource :account, :only => [:show, :destroy], :except => :destroy This now yields only the show action. This chaining can be useful for passing optional :except options to code that makes use of the :only option (e.g. for a gem with its own routing methods).
* | | | | Merge pull request #34488 from mullican/word_wrap_preserve_left_side_whitespaceRafael França2018-11-193-1/+23
|\ \ \ \ \ | | | | | | | | | | | | Prevent TextHelper#word_wrap from stripping white space on the left side of long lines; Fixes #34487
| * | | | | Prevent TextHelper#word_wrap from stripping white space on the leftLyle Mullican2018-11-193-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | side of long lines; Fixes #34487
* | | | | | Merge pull request #34085 from ↵Rafael França2018-11-192-34/+35
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | albertoalmagro/display-help-as-command-line-guides Homogenize also rails help command output
| * | | | | | Homogenize rails help outputAlberto Almagro2018-11-191-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 6567464bedd1e39ee7390da9484ba0caa7eb3e07 we homogenized rails commands with former rake tasks. We decided to display all commands at the same level and merged the list of commands displayed by `rails help`. We however forgot to actually merge the output in the command itself. This commit fixes that.
| * | | | | | Indent guides as rails help command output[ci skip]Alberto Almagro2018-11-191-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output from `rails help` actually leaves an empty space when printing the command lists. This commit adapts this guide to have the same format.
* | | | | | | Merge pull request #34106 from berniechiu/rails-5-job-serializable-params-classRafael Mendonça França2018-11-193-3/+34
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Permit of ActionController::Parameters for ActiveJob Serializable Argument
| * | | | | | | Permit ActionController::Parameters for serializable HashBernie Chiu2018-11-193-3/+34
|/ / / / / / /
* | | | | | | Merge pull request #34482 from jacobherrington/chore/add-comments-to-templatesRafael França2018-11-192-9/+8
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Add comments to markdown templates
| * | | | | | Add comments to markdown templatesjacobherrington2018-11-182-9/+8
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #34453 from bogdanvlviv/exercise-connected_to-and-connects_toAaron Patterson2018-11-192-1/+36
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Exercise `connected_to` and `connects_to` methods
| * | | | | Exercise `connected_to` and `connects_to` methodsbogdanvlviv2018-11-152-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since both methods are public API I think it makes sense to add these tests in order to prevent any regression in the behavior of those methods after the 6.0 release. Exercise `connected_to` - Ensure that the method raises with both `database` and `role` arguments - Ensure that the method raises without `database` and `role` Exercise `connects_to` - Ensure that the method returns an array of established connections(as mentioned in the docs of the method) Related to #34052
* | | | | | Merge pull request #34486 from tamarr/masterRafael Mendonça França2018-11-193-3/+772
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | allow right to left styling of docs
| * | | | | | allow right to left styling of docs (#3)tamarr2018-11-193-3/+771
| | |/ / / / | |/| | | | | | | | | | | | | | | | * adding rtl css main file and logic to use
* | | | | | Merge pull request #34410 from gmcgibbon/test_support_windowsEileen M. Uchitelle2018-11-193-3/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Windows support for parallelization and instrumenter
| * | | | | | Windows support for parallelization and instrumenterGannon McGibbon2018-11-083-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Windows support for `ActiveSupport::Testing::Parallelization` and `ActiveSupport::Notifications::Instrumenter`.
* | | | | | | Merge pull request #34476 from y-yagi/fix_no_method_error_in_parallelizationEileen M. Uchitelle2018-11-192-0/+16
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Correctly handle unknown object in parallel tests
| * | | | | | | Correctly handle unknown object in parallel testsyuuji.yaginuma2018-11-172-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRb wraps in `DRbUnknown` if the data contains a type that can not be resolved locally. This can happen if an error occurs in the test and the error class can not be resolved on the server side. When this happens, an instance of `DRbUnknown` is passed to the `result` of `Server#record`. This causes another error(undefined method assertions for #<DRb::DRbUnknown:> (NoMethodError)) in `reporter.record`. This can confirm by the following steps. ``` $ rails new app -B --dev; cd app $ rails g scaffold user name:string $ edit `config.action_controller.allow_forgery_protection = true` in environments/test.rb $ bin/rails t ``` In the case of `DRbUnknown` occurs, can't resolve error exception. So wrap exception with `DRbRemoteError` in the same way as an unmarshalled object.
* | | | | | | | Merge pull request #34483 from iguchi1124/patch-1Ryuta Kamizono2018-11-191-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update active_job_basics.md [ci skip]
| * | | | | | | | [ci skip] Update active_job_basics.mdShota Iguchi2018-11-191-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | ApplicationJob should be inherits ActiveJob::Base
* | | | | | | | Merge pull request #34481 from jacobherrington/patch-1Gannon McGibbon2018-11-199-15/+15
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | Correct a spelling error
| * | | | | | | Change queueing to queuing in docs and comments [skip ci]jacobherrington2018-11-189-15/+15
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My spellchecker flagged this as an incorrect spelling, upon further research it appears to be a point of contention in English. Either way might work. After further examination queuing is much more common in the Rails codebase so making this change will serve to standardize the spelling.
* | | | | | | Fix test name to match the test behavioryuuji.yaginuma2018-11-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests are for testing the `rake` method.
* | | | | | | Remove unused `Journey::Router::RoutingError`yuuji.yaginuma2018-11-181-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `Journey::Router::RoutingError` is no longer used since db06d128262b49c8b02e153cf95eb46f4eff364b.
* | | | | | | Merge pull request #34475 from ↵Yuji Yaginuma2018-11-171-3/+4
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | rmacklin/synchronize-actioncable-compiled-bundle-and-source Synchronize ActionCable JS source code with compiled bundle
| * | | | | | Synchronize ActionCable JS source code with compiled bundleRichard Macklin2018-11-161-3/+4
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 30a0c7e04093add0b14be6da17c7496e7dd40e10 commited changes to the compiled bundle but not to the corresponding source files. This meant that running `yarn build` was producing untracked changes to the compiled bundle. The fix is to commit the changes to the source files so that they are in sync.