aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | Don't passing `klass.connection` to `AssociationScope`Ryuta Kamizono2017-06-295-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing `klass.connection` is redundant because `AssociationScope` is passed an association itself and an association has `klass`.
* | | | | | | | | | | Merge pull request #29611 from kamipo/add_test_case_for_unscoping_default_scopeRafael França2017-06-281-2/+3
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add a test case for unscoping `default_scope` in associations
| * | | | | | | | | | | Add a test case for unscoping `default_scope` in associationsRyuta Kamizono2017-06-291-2/+3
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unscoping `default_scope` in associations has already supported (#17360 for preloading, c9cf8b8 for eager loading). Fixes #20679. Closes #16531.
* | | | | | | | | | | Merge pull request #29609 from tsukasaoishi/query_cache_from_beginningRafael França2017-06-283-20/+13
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | Enable query cache if set a configurations
| * | | | | | | | | | Enable query cache if set a configurationsTsukasa OISHI2017-06-293-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveRecord query cache is available when a connection is connected. Therefore, query cache is unavailable when entering the ActiveRecord::Base.cache block without being connected. ```ruby ActiveRecord::Base.cache do Task.find(1) # access to database. Task.find(1) # access to database. unavailable query cache end ``` If we use query cache with batch script etc, we need to connect before that. ```ruby Task.connection ActiveRecord::Base.cache do Task.find(1) # access to database. Task.find(1) # available query cache end ``` Before version 3.1, query cache had been enabled if a configuration was set up. In order to solve the `DATABASE_URL` issue(#8074), ActiveRecord has checked whether a connection is connected or not. Today, ActiveRecord.configurations respect `DATABASE_URL`. https://github.com/rails/rails/blob/master/activerecord/lib/active_record/core.rb#L46
* | | | | | | | | | | Merge pull request #29613 from jajajames/jajajames-patch-1Richard Schneeman2017-06-281-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | Fix grammar for documentation of rails/command.rb [ci skip]
| * | | | | | | | | | Fix grammar for documentation of rails/command.rb [ci skip]James Bush2017-06-281-1/+1
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #29604 from ↵Rafael França2017-06-282-5/+2
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/fix_ids_reader_to_respect_case_sensitive_pk Fix `ids_reader` to respect case sensitive primary key
| * | | | | | | | | Fix `ids_reader` to respect case sensitive primary keyRyuta Kamizono2017-06-282-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ```ruby car = Car.create!(name: "Tofaş") # Before car.bulb_ids # => SELECT "bulbs".ID FROM "bulbs" WHERE "bulbs"."name" = $1 AND "bulbs"."car_id" = $2 [["name", "defaulty"], ["car_id", 3]] # After car.bulb_ids # => SELECT "bulbs"."ID" FROM "bulbs" WHERE "bulbs"."name" = $1 AND "bulbs"."car_id" = $2 [["name", "defaulty"], ["car_id", 3]] ```
* | | | | | | | | | Merge pull request #29602 from kamipo/use_reload_in_test_find_first_after_reloadRafael França2017-06-281-10/+10
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Use `reload` in `test_find_first_after_reload`
| * | | | | | | | | Use `reload` in `test_find_first_after_reload`Ryuta Kamizono2017-06-281-10/+10
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And use `assert_same` instead of `assert_equal` and tiny fix assert message s/#reload/#reset/. Follow up of #29511.
* | | | | | | | | Merge pull request #29600 from kamipo/show_query_cache_keysRafael França2017-06-281-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Show query cache keys in `test_exceptional_middleware_clears_and_disables_cache_on_error`
| * | | | | | | | | Show query cache keys in ↵Ryuta Kamizono2017-06-281-1/+2
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_exceptional_middleware_clears_and_disables_cache_on_error` `test_exceptional_middleware_clears_and_disables_cache_on_error` in postgresql adapter sometime fails recently. Show the query cache keys to investigte the cause. https://travis-ci.org/rails/rails/jobs/246467252#L490-L493
* | | | | | | | | Merge pull request #29588 from greysteil/add-gemspec-linksRafael França2017-06-288-0/+40
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add source code and changelog links to gemspecs
| * | | | | | | | | Add source code and changelog links to gemspecsGrey Baker2017-06-288-0/+40
| | | | | | | | | |
* | | | | | | | | | Merge pull request #29595 from fatkodima/result_lambda_class_checkingRafael França2017-06-282-2/+2
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Remove useless class checking for `ActiveSupport::Callbacks`s result_lambda
| * | | | | | | | | | Remove useless class checking for `ActiveSupport::Callbacks`s result_lambdafatkodima2017-06-272-2/+2
| | | | | | | | | | |
* | | | | | | | | | | :scissors:Ryuta Kamizono2017-06-282-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | | Merge pull request #29593 from kratob/masterEileen M. Uchitelle2017-06-283-0/+23
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | ActiveRecord: do not create "has many through" records that have been removed
| * | | | | | | | | | ActiveRecord: do not create "has many through" records that have been removedTobias Kraze2017-06-283-0/+23
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a record was built on a HasManyThroughAssociation, then removed, and then the record was saved, the removed record would be created anyways.
* | | | | | | | | | Merge pull request #29533 from jdelStrother/missing_url_formatsRichard Schneeman2017-06-272-0/+11
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix missing formats in route-set URLs
| * | | | | | | | | | Fix missing formats in route-set URLsJonathan del Strother2017-06-232-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, handle_positional_args would end up mutating @segment_keys if inner_options included path components. Subsequent calls would then be missing the implicit path components. eg: user_path(1, :json) # => "/users/1.json" (correct) user_path(1, format: :json) # => "/users/1.json" (correct, but @segment_keys was mutated) user_path(1, :json) # => "/users/1" (oh no!)
* | | | | | | | | | | Merge pull request #29598 from y-yagi/fix_typo_in_callback_deprecation_msgRichard Schneeman2017-06-271-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in callback deprecation message
| * | | | | | | | | | | Fix typo in callback deprecation messageyuuji.yaginuma2017-06-281-1/+1
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #29518 from ragesoss/masterRafael França2017-06-271-2/+4
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add more explicit guidance on how to fix callback deprecations
| * | | | | | | | | | | Add more explicit guidance on how to fix callback deprecationsSage Ross2017-06-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecation warning message will be more useful if it indicates what the string was doing — being eval'd — and what the non-deprecated options for callback conditionals are.
* | | | | | | | | | | | Merge pull request #29551 from Edouard-chin/integration-test-follow-redirectRafael França2017-06-272-1/+13
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Calling `follow_redirect!` does not reset the `html_document`:
| * | | | | | | | | | | | Calling `follow_redirect!` does not reset the `html_document`:Edouard CHIN2017-06-262-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When making a request to a controller that redirects, `follow_redirect!` would not reset the `html_document` ivar, it only resets the `html_document` ivar from the session (not the runner) - If one was doing something like this; ```ruby get '/redirect' assert_select 'you are being redirected' follow_redirect! # html_document is memoized and doesn't get reset ``` - To fix the issue we can do the same for any other methods (`get`, `post`...) and define a method in the runner that delegates to the session but clears the html_document_first - Fixes #29367
* | | | | | | | | | | | | Merge pull request #29556 from kamipo/extract_ordered_relationRafael França2017-06-271-12/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / / / |/| | | | | | | | | | | | Extract `ordered_relation` in `FinderMethods`
| * | | | | | | | | | | | Extract `ordered_relation` in `FinderMethods`Ryuta Kamizono2017-06-241-12/+11
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #29589 from kamipo/refactor_join_scopeRafael França2017-06-273-54/+21
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor join dependency to move building constraints to `join_scope` in `Reflection`
| * | | | | | | | | | | | | Move building constraint to `join_scope` in `Reflection`Ryuta Kamizono2017-06-272-41/+14
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Move constructing polymorphic type to `join_scope` in `Reflection`Ryuta Kamizono2017-06-273-16/+10
| | |_|_|_|/ / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #29586 from padi/add_docs_for_postgresql_jsonb_datatype_in_arRafael França2017-06-271-1/+6
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document ActiveRecord's PostgreSQL-specific support for JSONB datatype
| * | | | | | | | | | | | | Document ActiveRecord's PostgreSQL-specific support for JSONB datatype in ↵Marc Rendl Ignacio2017-06-271-1/+6
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RailsGuides [ci skip]
* | | | | | | | | | | | | Merge pull request #29528 from padi/actioncable_redis_alt_config_with_passwordRafael França2017-06-275-8/+23
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows for other common redis options to be in cable.yml, by default
| * | | | | | | | | | | | | Adds CHANGELOG for f55ecc6 [ci skip]Marc Rendl Ignacio2017-06-271-0/+9
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Allows for other common redis options to be in cable.yml, by defaultMarc Ignacio2017-06-224-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds RedisAdapterTest::AlternateConfiguration to account for a relatively common alternative setup, as it’s used as the first example in the [Redis rubygem](https://github.com/redis/redis-rb#getting-started) - Supplies original RedisAdapterTest with more complete redis:// url format by adding a ‘userinfo’ (blank user), so that it resembles the alternate configuration - Supplies original EventedRedisAdapterTest with more complete redis:// url as well - Adds before_script to start redis-server with password as a daemon and with explicit defaults copied from the default redis.conf (Instead of using Travis' default init/upstart scripts for `redis` service)
* | | | | | | | | | | | | | Merge pull request #26587 from utilum/active_job_serialize_provider_job_idRafael França2017-06-272-0/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveJob::Core#serialize stores provider_job_id (fixes #26581).
| * | | | | | | | | | | | | | ActiveJob::Core#serialize stores provider_job_id (fixes #26581).utilum2017-06-272-0/+9
| | |/ / / / / / / / / / / / | |/| | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #29583 from amingilani/ignore-assetsRafael França2017-06-271-0/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore public/assets
| * | | | | | | | | | | | | | Ignore public/assetsamingilani2017-06-271-0/+4
| |/ / / / / / / / / / / / /
* | | | | | | | | | | | | | Merge pull request #29587 from kamipo/skip_instantiating_null_preloaderRafael França2017-06-271-11/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / |/| | | | | | | | | | | | | Skip instantiating `NullPreloader` if `assoc.klass` is nil
| * | | | | | | | | | | | | Skip instantiating `NullPreloader` if `assoc.klass` is nilRyuta Kamizono2017-06-271-11/+3
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simply we can skip instantiating `NullPreloader` if `assoc.klass` is nil.
* | | | | | | | | | | | | Merge pull request #29571 from kamipo/fix_extracting_references_via_order_valuesRafael França2017-06-262-1/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix extracting `references` via `order_values` to respect quoting
| * | | | | | | | | | | | | Fix extracting `references` via `order_values` to respect quotingRyuta Kamizono2017-06-262-1/+7
| | |_|/ / / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #29557 from kamipo/extract_build_scope_and_predicate_builderRafael França2017-06-263-20/+21
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract `build_scope` and `predicate_builder` in `Reflection`
| * | | | | | | | | | | | | Move constructing join scope to `Reflection`Ryuta Kamizono2017-06-262-13/+12
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Extract `build_scope` and `predicate_builder` in `Reflection`Ryuta Kamizono2017-06-243-12/+14
| | |_|/ / / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #29568 from kamipo/ensure_using_correct_alias_trackerRafael França2017-06-265-15/+20
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that using correct alias tracker