aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Introduce a new method for checking whether session_store is set by user or ↵Prathamesh Sonpatki2016-07-171-0/+4
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by Rails - We need to ability to check whether the session store it is set or not so that we can set it ourselves in an internal initializer. - We can't rely on return value of `config.session_store` as it can return `nil` when set to `disabled` and we will accidentally override it and set to default cookie store. - So introduced new method which just tells us whether it is set or not.
* | | | | | | Merge pull request #25578 from ↵Rafael França2016-07-207-20/+39
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/move_warning_about_composite_primary_key_to_attribute_methods_primary_key Move the warning about composite primary key to `AttributeMethods::PrimaryKey`
| * | | | | | | Move the warning about composite primary key to `AttributeMethods::PrimaryKey`Ryuta Kamizono2016-07-027-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually schema dumper/creation supports composite primary key (#21614). Therefore it should not show the warning about composite primary key in connection adapter. This change moves the warning to `AttributeMethods::PrimaryKey` and suppress the warning for habtm join table. Fixes #25388.
* | | | | | | | Merge pull request #25520 from st0012/fix-current-pageRafael França2016-07-202-0/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix ActionView::Helpers#current_page? with trailing space issue.
| * | | | | | | | Fix ActionView::Helpers#current_page? with issue in ↵Stan Lo2016-07-202-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/issues/19472
* | | | | | | | | Merge pull request #25889 from kamipo/do_not_dup_binds_in_to_sqlRafael França2016-07-201-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Do not `binds.dup` in `connection#to_sql`
| * | | | | | | | | Do not `binds.dup` in `connection#to_sql`Ryuta Kamizono2016-07-191-1/+1
| | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | Because `connection#to_sql` does not mutate `binds`.
* | | | | | | | | Merge pull request #25888 from kamipo/use_conn_to_sql_for_construct_sqlRafael França2016-07-201-10/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Use `connection#to_sql` for construct an SQL
| * | | | | | | | | Use `connection#to_sql` for construct an SQLRyuta Kamizono2016-07-191-10/+5
| |/ / / / / / / /
* | | | | | | | | Merge pull request #25823 from mechanicles/missing-memory-store-testsRafael França2016-07-201-0/+10
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add missing tests for memory store of cache.
| * | | | | | | | | Add missing tests for memory store of cache.Santosh Wadghule2016-07-171-0/+10
| | | | | | | | | |
* | | | | | | | | | Merge pull request #25849 from suginoy/fix_merge_in_scopeRafael Mendonça França2016-07-203-1/+12
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the calling `merge` method at first in a scope
| * | | | | | | | | | Fix the calling `merge` method at first in a scopesuginoy2016-07-193-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the order of method chaining `merge` and other query method such as `joins` should produce the same result. ```ruby class Topic < ApplicationRecord scope :safe_chaininig, -> { joins(:comments).merge(Comment.newest) } scope :unsafe_chaininig, -> { merge(Comment.newest).joins(:comments) } #=> NoMethodError end ```
* | | | | | | | | | | Merge pull request #25828 from bogdanvlviv/ref_default_sequence_nameRafael França2016-07-202-4/+5
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Refactored method `ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements#default_sequence_name`. Refactored test `HasManyAssociationsTest#test_do_not_call_callbacks_for_delete_all`.
| * | | | | | | | | | | Refactored test ↵bogdanvlviv2016-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `HasManyAssociationsTest#test_do_not_call_callbacks_for_delete_all`
| * | | | | | | | | | | Refactored method ↵bogdanvlviv2016-07-171-3/+3
| | |_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements#default_sequence_name`
* | | | | | | | | | | Merge pull request #25393 from gsamokovarov/introduce-assert-changesRafael França2016-07-203-9/+236
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Introduce `assert_changes` and `assert_no_changes`
| * | | | | | | | | | | Introduce `assert_changes` and `assert_no_changes`Genadi Samokovarov2016-07-173-9/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those are assertions that I really do miss from the standard `ActiveSupport::TestCase`. Think of those as a more general version of `assert_difference` and `assert_no_difference` (those can be implemented by assert_changes, should this change be accepted). Why do we need those? They are useful when you want to check a side-effect of an operation. `assert_difference` do cover a really common case, but we `assert_changes` gives us more control. Having a global error flag? You can test it easily with `assert_changes`. In fact, you can be really specific about the initial state and the terminal one. ```ruby error = Error.new(:bad) assert_changes -> { Error.current }, from: nil, to: error do expected_bad_operation end ``` `assert_changes` follows `assert_difference` and a string can be given for evaluation as well. ```ruby error = Error.new(:bad) assert_changes 'Error.current', from: nil, to: error do expected_bad_operation end ``` Check out the test cases if you wanna see more examples. :beers:
* | | | | | | | | | | | Merge pull request #25834 from ↵Rafael França2016-07-203-1/+19
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alpaca-tc/fixes_multiparameter_attributes_on_time_with_time_zone_aware_attributes Fix bug in method AR TimeZoneConverter#set_time_zone_without_conversion
| * | | | | | | | | | | | Fixes multiparameter attributes conversion with time_zone_aware_attributes ↵alpaca-tc2016-07-193-1/+19
| | |_|_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and invalid params
* | | | | | | | | | | | Merge pull request #25822 from ↵Rafael França2016-07-201-0/+12
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mechanicles/clear-local-cache-on-invalid-parameters-error Add missing test for clearing up local cache on invalid parameters error.
| * | | | | | | | | | | | Add missing test for clearing up local cache on invalid parameters err.Santosh Wadghule2016-07-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing test for clearing up local cache and check response should be present on invalid parameters error.
* | | | | | | | | | | | | Merge pull request #25869 from kamipo/specificiation_id_was_renamed_to_spec_nameRafael França2016-07-201-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | `specificiation_id` was renamed to `spec_name`
| * | | | | | | | | | | | | `specificiation_id` was renamed to `spec_name`Ryuta Kamizono2016-07-181-1/+1
| | |_|_|/ / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #25868 from kamipo/fix_payload_class_name_to_spec_nameRafael França2016-07-205-13/+10
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix `payload[:class_name]` to `payload[:spec_name]`
| * | | | | | | | | | | | | Fix `payload[:class_name]` to `payload[:spec_name]`Ryuta Kamizono2016-07-175-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to #20818. `retrieve_connection` is passed `spec_name` instead of `klass` since #24844.
* | | | | | | | | | | | | | Add a new rule to rubocopRafael Mendonça França2016-07-201-10/+13
| |_|_|/ / / / / / / / / / |/| | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #25780 from Ropeney/patch-1Matthew Draper2016-07-191-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update ActionCable Rebroadcasting a Message documentation
| * | | | | | | | | | | | | Update ActionCable Rebroadcasting a Message documentationJoseph Mullins2016-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace broadcast_to with ActionCable.server.broadcast to be inline with its partner, #stream_from
* | | | | | | | | | | | | | Merge pull request #25886 from kamipo/pass_type_casted_binds_to_log_subscriberXavier Noria2016-07-196-25/+29
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / / / / |/| | | | | | | | | | | | | Pass `type_casted_binds` to log subscriber for logging bind values properly
| * | | | | | | | | | | | | Pass `type_casted_binds` to log subscriber for logging bind values properlyRyuta Kamizono2016-07-196-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address to https://github.com/rails/rails/commit/5a302bf553af0e6fedfc63299fc5cd6e79599ef3#commitcomment-18288388.
* | | | | | | | | | | | | | Merge pull request #25883 from claudiob/fix-gotchaClaudio B2016-07-181-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / |/| | | | | | | | | | | | | Fix docs in collection_radio_buttons
| * | | | | | | | | | | | | Fix docs in collection_radio_buttonsclaudiob2016-07-181-3/+3
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Just some english and `<tt>` tags.
* | | | | | | | | | | | | Merge pull request #25881 from kamipo/logging_type_casted_bindsSean Griffin2016-07-181-1/+5
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging type casted binds
| * | | | | | | | | | | | | Logging type casted bindsRyuta Kamizono2016-07-191-1/+5
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #22398.
* | | | | | | | | | | | | Merge pull request #25878 from alexcameron89/associations_docJon Moss2016-07-181-13/+13
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Fix grammar in AR::Associations
| * | | | | | | | | | | | | [ci skip] Fix grammar in AR::AssociationsAlex Kitchens2016-07-181-13/+13
|/ / / / / / / / / / / / /
* | | | | | | | | | | | | deprecates the error_on_ignored_order_or_limit instance readerXavier Noria2016-07-182-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Albeit the previous existence of this method is not seen in the patch itself, the declaration mattr_accessor :error_on_ignored_order_or_limit, instance_writer: false was present before. It was removed recently in 210012f.
* | | | | | | | | | | | | adds coverage for the deprecation of error_on_ignored_orderXavier Noria2016-07-181-0/+8
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #25866 from prathamesh-sonpatki/rm-deprecated-mattr-accessorXavier Noria2016-07-182-5/+12
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / |/| | | | | | | | | | | | Followup of changes done to `error_on_ignored_order`
| * | | | | | | | | | | | Fix documentation of `error_on_ignored_order` optionPrathamesh Sonpatki2016-07-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Followup of https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7
| * | | | | | | | | | | | Remove mattr_accessor for deprecated config `error_on_ignored_order_or_limit`.Prathamesh Sonpatki2016-07-181-1/+8
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - It adds lot of warnings while running the tests. After https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7 it is not needed. - Added reader method with deprecation warning for backward compatibility.
* | | | | | | | | | | | Merge pull request #25867 from kamipo/no_need_public_sendMatthew Draper2016-07-171-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | No need `public_send`
| * | | | | | | | | | | No need `public_send`Ryuta Kamizono2016-07-171-2/+2
|/ / / / / / / / / / /
* | | | | | | | | | | Store the old logger before calling superRafael Mendonça França2016-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setup in ActiveSupport::LogSubscriber::TestHelper call set_logger that will change ActionController::Base.logger to the MockLogger so that logger will be always MockLogger
* | | | | | | | | | | Check if the logger exists before trying to use itRafael Mendonça França2016-07-171-1/+1
| | | | | | | | | | |
* | | | | | | | | | | Make sure the time method is unstubedRafael Mendonça França2016-07-171-29/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minitest stubs were conflicting with the time travel stubs so the travel_back method call in the teardown block was actually keeping the time stubbed.
* | | | | | | | | | | Sort the mime types before comparingRafael Mendonça França2016-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For those tests that use start we don't need to assert the actual order of mime types that are returned. This happen because this order is more about the order the mime type was registered than the order that it is expected to it resolve. We need to sort because we remove the json mime type in json_params_parsing_test and add it to the end of the mime types set so if that file runs before those tests we will have a failing test. [Rafael Mendonça França + Lucas Hosseini]
* | | | | | | | | | | Make sure the tests setup are made correctlyRafael Mendonça França2016-07-171-9/+9
| |_|/ / / / / / / / |/| | | | | | | | |
* | | | | | | | | | Merge pull request #20818 from ↵Rafael França2016-07-174-0/+95
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jeremywadsack/use_transactional_fixtures_all_databases Use notification to ensure that lazy-loaded model classes have transactions