aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge pull request #25973 from ↵Matthew Draper2016-07-283-5/+5
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | kamipo/should_freeze_quoted_column_table_names_cache `@quoted_{column,table}_names` should cache a frozen string
| * | | | | | | `@quoted_{column,table}_names` should cache a frozen stringRyuta Kamizono2016-07-283-5/+5
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caching a mutable string causes the following issue. ``` Loading development environment (Rails 5.1.0.alpha) irb(main):001:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!' => "`foo`!!" irb(main):002:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!' => "`foo`!!!!" irb(main):003:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!' => "`foo`!!!!!!" ```
* | | | | | | Merge pull request #25948 from chetna1726/docsRafael França2016-07-281-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Add documentation for error using select with order
| * | | | | | | [ci skip] Add documentation for error using select with orderChetna Sharma2016-07-251-0/+1
| | | | | | | |
* | | | | | | | Merge pull request #25961 from Azzurrio/masterRafael França2016-07-284-1/+18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix accessing provider_job_id inside active jobs for sidekiq adapter
| * | | | | | | | Fix accessing provider_job_id inside active jobs for sidekiq adapterAzzurrio2016-07-284-1/+18
| | | | | | | | |
* | | | | | | | | Merge pull request #25952 from harfangk/masterप्रथमेश Sonpatki2016-07-281-19/+14
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Updated getting_started.md guide source text to reflect the change in error message …
| * | | | | | | | | Updated getting_started guide to reflect the change in error message for ↵Bonghyun Kim2016-07-281-19/+14
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionController::UnknownFromat in ArticlesController#new Restored texts about XML and JS template handlers. [ci skip]
* | | | | | | | | Do not require rb-inotifyRafael Mendonça França2016-07-271-1/+1
| | | | | | | | |
* | | | | | | | | Use a form of rb-inotify to fix broken tests with Ruby 2.2.5Rafael Mendonça França2016-07-272-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/nex3/rb-inotify/pull/49
* | | | | | | | | Merge pull request #25767 from ↵Rafael França2016-07-274-3/+20
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/association_name_is_the_same_as_join_table_name Correctly return `associated_table` when `associated_with?` is true
| * | | | | | | | | Correctly return `associated_table` when `associated_with?` is trueRyuta Kamizono2016-07-104-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `AssociationQueryHandler` requires `association` initialized `TableMetadata` even if `table_name == arel_table.name`. Fixes #25689.
* | | | | | | | | | Add the TABLE_SCHEMA condition to the SELECT statement in table_comment (#25945)Takeshi AKIMA2016-07-272-1/+6
| |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | [Rafael Mendonça França + Takeshi AKIMA]
* | | | | | | | | Merge pull request #25702 from k0kubun/joins-circular-referenceSean Griffin2016-07-272-1/+10
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove circular join references in join_dependency
| * | | | | | | | | Remove circular join references in join_dependencyTakashi Kokubun2016-07-282-1/+10
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | Fixes #25653.
* | | | | | | | | Merge pull request #25963 from bdewater/auth_tag_docRafael França2016-07-271-0/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add rationale for checking auth_tag length for AEAD ciphers
| * | | | | | | | | Add rationale for manually checking auth_tag length, which got lost when ↵Bart de Water2016-07-271-0/+4
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | #25874 was squashed before merging [skip ci]
* | | | | | | | | Merge pull request #25913 from chrisarcand/fix-keyed-defaults-with-rootRafael Mendonça França2016-07-273-1/+33
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix keyed defaults with root
| * | | | | | | | | Update changelogChris Arcand2016-07-261-0/+7
| | | | | | | | | |
| * | | | | | | | | Fix 'defaults' option for root routeChris Arcand2016-07-212-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merging of the 'defaults' option was moved up the stack in e852daa This allows us to see where these options originate from the standard HttpHelpers (get, post, patch, put, delete) Unfortunately this move didn't incorporate the 'root' method, which has always allowed the same 'defaults' option before.
* | | | | | | | | | Generators and tests are under the same style rulesRafael Mendonça França2016-07-271-14/+0
| | | | | | | | | |
* | | | | | | | | | Bump arelRafael Mendonça França2016-07-271-2/+2
| | | | | | | | | |
* | | | | | | | | | Merge pull request #25938 from ↵Rafael França2016-07-272-10/+10
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/decouple_statement_cache_from_connection_adapter Decouple statement cache from connection adapter
| * | | | | | | | | Decouple statement cache from connection adapterRyuta Kamizono2016-07-242-10/+10
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `StatementCache` is hard-coded in `cacheable_query` and be passed `visitor` and `collector` from connection adapter. Simply it is enough to pass a collected value.
* | | | | | | | | Merge pull request #25958 from kamipo/should_be_target_loadedYves Senn2016-07-271-0/+38
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add an assertion to the tests that should be loaded the target.
| * | | | | | | | | Add an assertion to the tests that should be loaded the target.Ryuta Kamizono2016-07-271-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These test cases tests exactly mutating loaded target.
* | | | | | | | | | Merge pull request #25408 from kamipo/should_not_reuse_quoted_trueYves Senn2016-07-273-5/+21
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Quoting booleans should return a frozen string
| * | | | | | | | | | Quoting booleans should return a frozen stringRyuta Kamizono2016-07-273-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If reuse `QUOTED_TRUE` and `QUOTED_FALSE` without frozen, causing the following issue. ``` Loading development environment (Rails 5.1.0.alpha) irb(main):001:0> ActiveRecord::Base.connection.quote(true) << ' foo' => "1 foo" irb(main):002:0> ActiveRecord::Base.connection.quote(true) << ' foo' => "1 foo foo" irb(main):003:0> type = ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::MysqlString.new => #<ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::MysqlString:0x007fd40c15e018 @precision=nil, @scale=nil, @limit=nil> irb(main):004:0> type.serialize(true) << ' bar' => "1 foo foo bar" irb(main):005:0> type.cast(true) << ' bar' => "1 foo foo bar bar" ```
* | | | | | | | | | | There are some cases where @@app is not definedSantiago Pastorino2016-07-263-20/+33
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #25523 from kamipo/extract_quoted_binds_type_casted_bindsSean Griffin2016-07-264-6/+10
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Extract `type_casted_binds` method
| * | | | | | | | | | | Extract `type_casted_binds` methodRyuta Kamizono2016-07-264-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because `type_cast` against `binds` always requires `attr.value_for_database` and this pattern appears frequently.
* | | | | | | | | | | | Be more explicit with the expected resultSantiago Pastorino2016-07-261-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Return ActionDispatch.test_app when no app is set on IntegrationTest.app methodSantiago Pastorino2016-07-262-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #25926
* | | | | | | | | | | | Merge pull request #25919 from benpickles/skip-javascript-also-skips-uglifierGuillermo Iguaran2016-07-264-3/+18
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Uglifier should not be included when generating a new app with `--skip-javascript`
| * | | | | | | | | | | | A generated app should not include Uglifier with `--skip-javascript` option.Ben Pickles2016-07-264-3/+18
|/ / / / / / / / / / / /
* | | | | | | | | | | | Merge pull request #25912 from ↵Santiago Pastorino2016-07-263-1/+20
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stevenharman/fix_render_partial_collection_to_allow_custom_collection Changed partial rendering to allow collections which don't implement `#to_ary`.
| * | | | | | | | | | | Use to_a to pre-buffer the collectionSteven Harman2016-07-262-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can safely assume we're not dealing with an infinite collection as we're about to call `each` on it and collect the results until it terminates on its own. Given that, `to_a` is implemented by the normal Array-like objects, and less Array-like objects like `Enumerator` and `Enumerator::Lazy`.
| * | | | | | | | | | | Default to an empty collection if falsey givenSteven Harman2016-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will ensure we attempt to render an empty collection, meaning we don't actually render anything at all. Allowing `nil` or a falsey value through results in calling `render_partial` rather than `render_collection`, which isn't what we want.
| * | | | | | | | | | | Use Ruby >= 1.9 hash syntax as is the preferenceSteven Harman2016-07-261-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Fix collection_from_options to allow EnumeratorsSteven Harman2016-07-263-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An optimization was introduced in https://github.com/rails/rails/commit/27f4ffd11a91b534fde9b484cb7c4e515ec0fe77 which tried to `#to_ary` the collection to prevent unnecessary queries for ActiveRecord scopes/relations. If the given collection did not respond to `#to_ary`, and empty collection was returned. That meant you couldn't use collections built from `Enumerator` nor `Enumerable`. With this change, `#collection_from_options` will attempt the optimization, but fall back to passing along the given collection, as-is.
* | | | | | | | | | | | Merge pull request #25929 from kamipo/load_target_is_public_methodSantiago Pastorino2016-07-263-7/+5
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | `load_target` is a public method
| * | | | | | | | | | | `load_target` is a public methodRyuta Kamizono2016-07-233-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `send` is unnecessary.
* | | | | | | | | | | | Merge pull request #25953 from ↵Santiago Pastorino2016-07-261-4/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/make_force_signal37_to_load_all_clients_of_firm_to_private Make `force_signal37_to_load_all_clients_of_firm` to private
| * | | | | | | | | | | | Make `force_signal37_to_load_all_clients_of_firm` to privateRyuta Kamizono2016-07-261-4/+6
| | |_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a test case.
* | | | | | | | | | | | Merge pull request #25936 from prathamesh-sonpatki/bump-arelSantiago Pastorino2016-07-261-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | Bump Arel to fix few failing tests on Ruby 2.4 related to the Integer unification
| * | | | | | | | | | | Bump Arel to fix few failing tests on Ruby 2.4 related to the Integer ↵Prathamesh Sonpatki2016-07-241-1/+1
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unification * Following tests were failing on Ruby edge 2.4 version - - RelationTest#test_update_all_with_joins_and_offset_and_order: - RelationTest#test_update_all_with_joins_and_offset: - BasicsTest#test_no_limit_offset: - CalculationsTest#test_offset_is_kept: - ActiveRecord::CollectionCacheKeyTest#test_cache_key_for_queries_with_offset_which_return_0_rows: - FinderTest#test_third_to_last: * As Arel 7.1 supports Integer unification after https://github.com/rails/arel/pull/437 we can use it.
* | | | | | | | | | | Merge pull request #25950 from jules2689/masterRafael França2016-07-251-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix an exception where content-type is nil
| * | | | | | | | | | | Also yield in parameters for a nil content_mime_typeJulian Nadeau2016-07-251-1/+1
| | |_|_|_|_|/ / / / / | |/| | | | | | | | |
* | | | | | | | | | | Whoops, forgot the changelog entry for the previous commitSean Griffin2016-07-251-0/+5
| | | | | | | | | | |
* | | | | | | | | | | Correct the behavior of virtual attributes on models loaded from the dbSean Griffin2016-07-256-12/+74
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we had primarily tested the behavior of these attributes by calling `.new`, allowing this to slip through the cracks. There were a few ways in which they were behaving incorrectly. The biggest issue was that attempting to read the attribute would through a `MissingAttribute` error. We've corrected this by returning the default value when the attribute isn't backed by a database column. This is super special cased, but I don't see a way to avoid this conditional. I had considered handling this higher up in `define_default_attribute`, but we don't have the relevant information there as users can provide new defaults for database columns as well. Once I corrected this, I had noticed that the attributes were always being marked as changed. This is because the behavior of `define_default_attribute` was treating them as assigned from `Attribute::Null`. Finally, with our new implementation, `LazyAttributeHash` could no longer be marshalled, as it holds onto a proc. This has been corrected as well. I've not handled YAML in that class, as we do additional work higher up to avoid YAML dumping it at all. Fixes #25787 Close #25841