aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add info about updating locking column valuebogdanvlviv2016-10-231-0/+1
| | | | | [ci skip] Follow #26050
* Revert "Made ActiveRecord consistently use ActiveRecord::Type (not"Sean Griffin2016-10-238-23/+9
| | | | | | This reverts commit 671eb742eec77b5c8281ac2a2e3976ef32a6e424. This is not a change we would like moving forward.
* Update mysql2 version in Gemfile.lockGuillermo Iguaran2016-10-221-4/+4
|
* Update mysql adapter error message when disconnectedGuillermo Iguaran2016-10-221-2/+2
|
* Merge pull request #26863 from claudiob/revert-26826Rafael França2016-10-221-1/+6
|\ | | | | Revert #26826 and add documentation
| * Revert #26826 and add documentationclaudiob2016-10-211-1/+6
|/ | | | | | | | | | | | | | | | This reverts commit a01cf703 as explained in the comment to #26826: Realized that this PR caused the following warning in Travis CI: ``` /home/travis/build/rails/rails/activesupport/lib/active_support/dependencies.rb:293: warning: loading in progress, circular require considered harmful - /home/travis/build/rails/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb ``` Indeed, `active_support/core_ext/hash/indifferent_access.rb` **needs** to require `active_support/hash_with_indifferent_access.rb` in order to access the class `ActiveSupport::HashWithIndifferentAccess`. The other way around, though, is not _strictly_ required, unless someone tries (like I did in the [gist above](https://gist.github.com/claudiob/43cc7fe77ff95951538af2825a71e5ec)) to use `ActiveSupport::HashWithIndifferentAccess` by only requiring `active_support/hash_with_indifferent_access.rb` without first requiring `active_support/core_ext/hash/indifferent_access.rb`. I think the solution to this is to revert this PR and instead change the documentation to explicitly state that **developers should not require 'active_support/hash_with_indifferent_access'** if all they want is to use `ActiveSupport::HashWithIndifferentAccess` – instead they should require `active_support/core_ext/hash/indifferent_access.rb`.
* Merge pull request #26790 from iainbeeston/type-tests-in-their-own-filesRafael França2016-10-2213-168/+266
|\ | | | | Refactored ActiveModel::Type tests into their own files
| * Refactored ActiveModel::Type tests into their own filesIain Beeston2016-10-1513-168/+266
| |
* | Merge pull request #26810 from maclover7/jm-fix-26802Rafael Mendonça França2016-10-222-0/+38
|\ \ | | | | | | | | | Convert ActionController::Parameters to a hash in button_to
| * | Convert ActionController::Parameters to a hash in button_toJon Moss2016-10-172-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, an error would be raised saying that the method `to_param` was undefined on the instance of `ActionController::Parameters`. Now, we are checking to see if the `params` object being passed to `button_to` responds to the `permitted?` method, and if so, we will call `to_h` on it. If it does not respond to `permitted?`, then the `params` will remain unchanged. [Jon Moss, Rafael Mendonça França]
* | | Merge pull request #26416 from prathamesh-sonpatki/fix-select-exampleRafael França2016-10-224-7/+22
|\ \ \ | | | | | | | | Fix regression caused due to removal of select method from CollectionAssociation
| * | | Fix regression caused due to removal of select method from CollectionAssociationPrathamesh Sonpatki2016-10-224-7/+22
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CollectionAssociation#select was removed in https://github.com/rails/rails/pull/25989 in favor of QueryMethods#select but it caused a regression when passing arguments to select and a block. - This used to work earlier in Rails 4.2 and Rails 5. See gist https://gist.github.com/prathamesh-sonpatki/a7df922273473a77dfbc742a4be4b618. - This commit restores the behavior of Rails 4.2 and Rails 5.0.0 to allow passing arguments and block at the same time but also deprecates it. - Because, these arguments do not have any effect on the output of select when select is used with a block. - Updated documentation to remove the example passing arguments and block at the same time to `CollectionProxy#select`.
* | | Merge pull request #26843 from denisovlev/strptime_timestampsRafael França2016-10-223-11/+40
|\ \ \ | | | | | | | | Fix `ActiveSupport::TimeZone#strptime` cannot parse timestamps (%Q, %s)
| * | | Fix `ActiveSupport::TimeZone#strptime` cannot parse timestamps (%Q, %s)denisovlev2016-10-213-11/+40
| | | |
* | | | Merge pull request #26826 from claudiob/add-requireClaudio B2016-10-211-0/+1
|\ \ \ \ | | | | | | | | | | Add missing require in active_support/hash_with_indifferent_access.rb
| * | | | Add missing requireclaudiob2016-10-191-0/+1
| | | | |
* | | | | Merge pull request #26862 from headius/lazy_load_blade_for_testsGuillermo Iguaran2016-10-211-1/+2
|\ \ \ \ \ | | | | | | | | | | | | Lazy-load blade for actioncable tests; no blade on JRuby.
| * | | | | Lazy-load blade for actioncable tests; no blade on JRuby.Charles Oliver Nutter2016-10-211-1/+2
| | | | | |
* | | | | | Merge pull request #26860 from headius/soft_ordering_in_yaml_dumpKasper Timm Hansen2016-10-221-6/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Soften this test since YAML.dump may produce keys in other orders.
| * | | | | | Soften this test since YAML.dump may produce keys in other orders.Charles Oliver Nutter2016-10-211-6/+4
| |/ / / / /
* | | | | | Use `on_load` to trigger commandline processing codeAaron Patterson2016-10-213-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | We need to use on_load so that plugins will get the same functionality
* | | | | | Prevent the test framework from being loaded in production modeAaron Patterson2016-10-213-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test framework should not be autoloaded in production mode. Before this commit, the testing railtie would extend AS::TestCase. This caused AS::TestCase to be preloaded regardless of the environment in which we were running. This commit just moves the code that adds line filtering support in to the test command where we actually execute the test runner. That allows us to maintain the line runner feature but only load the minimal amount of code we need.
* | | | | | Merge pull request #26859 from headius/mask_use_of_rubyvm_on_jrubyAaron Patterson2016-10-211-0/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Skip test that depends on RubyVM when it is not available (JRuby).
| * | | | | Skip test that depends on RubyVM when it is not available (JRuby).Charles Oliver Nutter2016-10-211-0/+2
|/ / / / /
* | | | | Revert "Undefine assings in IntegrationTest"Rafael Mendonça França2016-10-212-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5dde413e1d14c42eb87071db20d075a7b962cb01. Reason: The gem defines it so we don't need to remove
* | | | | Merge pull request #26819 from lastgabs/add-examples-active-job-test-helperRafael França2016-10-211-0/+24
|\ \ \ \ \ | | | | | | | | | | | | Add examples of queue_adapter and perform_enqueued jobs to API Docs.
| * | | | | Add examples of queue_adapter and perform_enqueued jobs to API Docs.Gabi Stefanini2016-10-211-0/+24
| | | | | |
* | | | | | Merge pull request #26050 from bogdanvlviv/optimistic_lockingAaron Patterson2016-10-215-20/+157
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fixed: Optimistic locking does not work correctly
| * | | | | Added ability update locking_column valuebogdanvlviv2016-10-214-7/+90
| | | | | |
| * | | | | Fixed: Optimistic locking does not work well with null in the databasebogdanvlviv2016-10-214-15/+69
|/ / / / /
* | | | | Merge pull request #26855 from headius/explicit_order_callback_argsAaron Patterson2016-10-211-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Additional fix for argument-splat ordering differences.
| * | | | | Additional fix for argument-splat ordering differences.Charles Oliver Nutter2016-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | See #26854
* | | | | | Merge pull request #26854 from headius/explicit_order_callback_argsAaron Patterson2016-10-211-4/+4
|\| | | | | | | | | | | | | | | | | Explicitly unpack the expanded args to avoid execution order diff.
| * | | | | Explicitly unpack the expanded args to avoid execution order diff.Charles Oliver Nutter2016-10-211-4/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://bugs.ruby-lang.org/issues/12860 I argue that MRI's execution order here is incorrect. The splatting of the 'c' args should happen before the shift, but it happens after. On JRuby, it behaves the way you would expect, leading to the 'c' args splat still containing the block and producing an error like "cannot convert proc to symbol" when the send attempts to coerce it. This patch makes the unpacking order explicit with a multi-assign, which behaves properly on all implementations I tested.
* | | | | Merge pull request #26853 from zegomesjf/feature/skip_active_recordGuillermo Iguaran2016-10-212-0/+2
|\ \ \ \ \ | |/ / / / |/| | | | don't create db directory when skip active_record
| * | | | don't create db directory when skip active_recordJosé Gomes Júnior2016-10-212-0/+2
|/ / / /
* | | | Merge pull request #26839 from renuo/fix-missing-nsec-transferAndrew White2016-10-213-2/+10
|\ \ \ \ | | | | | | | | | | Fix copy_time_to: Copy nsec instead of usec
| * | | | Fix copy_time_to: Copy nsec instead of usecJosua Schmid2016-10-203-2/+10
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `copy_time_to` is a helper function for date and time calculations. It's being used by `prev_week`, `next_week` and `prev_weekday` to keep the time fraction when jumping around between days. Previously the nanoseconds part was lost during the operation. This lead to problems in practice if you were using the `end_of_day` calculation. Resulting in the time fraction of `end_of_day` not being the same as next week's `end_of_day`. With this fix `copy_time_to` doesn't forget the `nsec` digits.
* | | | doc, hide non-public methods form the api docs. [ci skip]Yves Senn2016-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to #25681, specifically this comment: https://github.com/rails/rails/pull/25681#issuecomment-238294002 The way the thread local variable is stored is an implementation detail and subject to change. It makes no sense to only generate a reader or writer as you'd have to know where to read from or where it writes to.
* | | | guides, include note about modifiers when using the CLI.Yves Senn2016-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] This was pointed out on https://github.com/rails/rails/issues/15583#issuecomment-239212831 The comment was lost in the changes made by fcd0ac066e0959a9f4fa4459a27e041abe8eb52a and 3e1373a773085d5f19cb6a466ab2736cc1ca2713
* | | | remove trailing whitespace [ci skip]Yves Senn2016-10-201-8/+8
| | | |
* | | | Merge pull request #26846 from brunofacca/patch-1Rafael França2016-10-201-4/+4
|\ \ \ \ | | | | | | | | | | [ci skip] Fix return values of Hash Extensions examples
| * | | | [ci skip] Fix return values of Hash Extensions examplesBruno Facca2016-10-201-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hashes returned in some examples of the following sections had items in a different order than their receivers. That may mislead readers into believing those methods will not preserve element order. Extensions to Hash/Working with Keys/transform_keys and transform_keys! Extensions to Hash/Working with Keys/stringify_keys and stringify_keys! Extensions to Hash/Working with Keys/symbolize_keys and symbolize_keys! Extensions to Hash/Slicing
* | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-10-202-4/+4
|\ \ \ \
| * | | | Corrected comments referring to documentation inIain Beeston2016-10-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActiveRecord::Type::Value` This is now defined in `ActiveModel::Type::Value` (`ActiveRecord::Type::Value` still exists but it's effectively an alias)
| * | | | Corrected comments referring to ActiveModel::AttributesIain Beeston2016-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | Should be ActiveRecord::Attributes (ActiveModel::Attributes does not exist)
* | | | | Use old typecasting method if no type casted binds are passed inAaron Patterson2016-10-202-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query cache doesn't type cast bind parameters since it isn't actually querying the database, so it can't pass those values in. Type casting in the query cache method would cause the values to be type cast twice in the case that there is a cache miss (since the methods it calls will type cast *again*). If logging is disabled, then adding the type cast code to the query cache method will needlessly typecast the values (since the only reason those values are type cast is for display in the logs). Fixes #26828.
* | | | | Merge pull request #26830 from headius/mask_forking_fsevent_test_on_jrubyRafael Mendonça França2016-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | Mask forking filesystem event on JRuby.
* | | | | render_bind should be privateAaron Patterson2016-10-191-10/+10
| | | | |
* | | | | Merge pull request #26829 from headius/wait_for_events_in_listen_testsAaron Patterson2016-10-191-0/+18
| | | | | | | | | | | | | | | | | | | | Wait for file events to propagated for slower Listen backends.