aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #35034 from sponomarev/chore/ac-docs-worker-poolEileen M. Uchitelle2019-02-122-5/+18
|\ | | | | Add Worker Pool section to Action Cable configuration docs
| * Add Worker Pool section to Action Cable configuration docsSergey Ponomarev2019-02-012-5/+18
| |
* | Merge pull request #34714 from palkan/chore/refactor-action-cable-server-configKasper Timm Hansen2019-02-133-11/+29
|\ \ | | | | | | Action Cable: allow multiple instances of Server::Base with different configs
| * | Allow passing custom config to ActionCable::Server::BaseVladimir Dementyev2019-02-123-11/+29
|/ / | | | | | | | | That allows us to create a separate, isolated Action Cable server instance within the same app.
* | Should respect attribute_types over column_typesRyuta Kamizono2019-02-131-2/+1
| | | | | | | | Fixed the CI failure https://travis-ci.org/rails/rails/jobs/492291248#L1185-L1191.
* | Merge pull request #35237 from eileencodes/fix-teardown-in-db-selector-testEileen M. Uchitelle2019-02-121-0/+4
|\ \ | | | | | | Fix DatabaseSelector test that fails sometimes
| * | Fix DatabaseSelector test that fails sometimeseileencodes2019-02-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On CI we've seen a few test failures when the DatabaseSelectorTest runs before the ConnectionHandlersMultiDbTest. This is because it's creating 2 handlers but not properly tearing them down. Example failure: ``` Failure: ActiveRecord::ConnectionAdapters::ConnectionHandlersMultiDbTest#test_connects_to_with_single_configuration [/rails/activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:241]: Expected: 1 Actual: 2 ```
* | | Fix `pluck` and `select` with custom attributesRyuta Kamizono2019-02-1310-16/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently custom attributes are always qualified by the table name in the generated SQL wrongly even if the table doesn't have the named column, it would cause an invalid SQL error. Custom attributes should only be qualified if the table has the same named column.
* | | Merge pull request #35235 from rails/fxn/zeitwerkXavier Noria2019-02-1217-66/+385
|\ \ \ | | | | | | | | Zeitwerk integration
| * | | styleXavier Noria2019-02-122-3/+5
| | | |
| * | | Zeitwerk integrationXavier Noria2019-02-1217-66/+383
| | | |
* | | | Merge pull request #35175 from drn/create-sessionGuillermo Iguaran2019-02-122-1/+28
|\ \ \ \ | |/ / / |/| | | Support testing of non-ActionDispatch-routed apps.
| * | | Support testing of non-ActionDispatch-routed apps.Darren Cheng2019-02-052-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The [Grape API framework](https://github.com/ruby-grape/grape) regularly writes tests like [spec/grape/api_spec.rb](https://github.com/ruby-grape/grape/blob/master/spec/grape/api_spec.rb). When attempting to write a test in a Rails environment similar to the following: ``` describe Grape::Api, type: :request do let(:app) { Class.new(Grape::API) do get 'test' do { foo: 'bar' } end end } it '200s' do get 'test' end end ``` The following exception is thrown: ``` NoMethodError: undefined method `url_helpers' for #<Array:0x00007fb4e4bc4c88> -- 0: .../lib/action_dispatch/testing/integration.rb:330:in `block in create_session' 1: .../lib/action_dispatch/testing/integration.rb:326:in `initialize' 2: .../lib/action_dispatch/testing/integration.rb:326:in `new' 3: .../lib/action_dispatch/testing/integration.rb:326:in `create_session' 4: .../lib/action_dispatch/testing/integration.rb:316:in `integration_session' 5: .../lib/action_dispatch/testing/integration.rb:348:in `block (2 levels) in <module:Runner>' ``` This change explicitly ensures that `app.routes` is an `ActionDispatch::Routing::RouteSet` instance.
* | | | Add missing packages (#35227)Yuji Yaginuma2019-02-121-0/+2
| | | | | | | | | | | | | | | | If generate application without specified options,`actioncable` and `activestorage` loads by default.
* | | | Merge pull request #32861 from zvkemp/asn-unsubscribe-proxyAaron Patterson2019-02-115-3/+100
|\ \ \ \ | | | | | | | | | | use ProxyPattern to match for ActiveSupport::Notifications fanout/unsubscribe
| * | | | use a proxy matcher for AS::N fanoutzvkemp2019-02-115-3/+100
| | | | |
* | | | | Merge pull request #35226 from olivierlacan/docs/active-job-queue-as-blockRafael França2019-02-111-0/+20
|\ \ \ \ \ | | | | | | | | | | | | Document queue_as block arguments and their use
| * | | | | Document queue_as block arguments and their useOlivier Lacan2019-02-111-0/+20
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we only document the use case for ActiveJob's `queue_as` block arguments in [Rails Guides][1]. It seems necessary to document them in the API docs as well considering how useful and powerful this option is. [1]: https://edgeguides.rubyonrails.org/active_job_basics.html#queues [ci skip]
* | | | | Avoid implicit delegation in the migration compatibilityRyuta Kamizono2019-02-121-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implicit delegation in the migration class is to be logged. It is not intended in the migration compatibility, so it should be avoided. Fixes #35224.
* | | | | Merge pull request #35198 from paracycle/uk-change-config-for-behaviourGannon McGibbon2019-02-113-9/+149
|\ \ \ \ \ | | | | | | | | | | | | Allow deprecated non-symbol access to nested `config_for` hashes
| * | | | | Fix assertion excpected/actual orderUfuk Kayserilioglu2019-02-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion from the previous PR had the expected and the actual values in the wrong order, so when a test failed the error message was confusing. This commit fixes the problem by switching the order.
| * | | | | Allow deprecated non-symbol access to nested `config_for` hashesUfuk Kayserilioglu2019-02-113-3/+143
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A change to `Rails::Application.config_for` in https://github.com/rails/rails/pull/33815 and https://github.com/rails/rails/pull/33882 has altered the behaviour of the returned object in a breaking manner. Before that change, nested hashes returned from `config_for` could be accessed using non-symbol keys. After the change, all keys are recursively symbolized so non-symbol access fails to read the expected values. This is a breaking change for any app that might be relying on the nested hashes returned from `config_for` calls, and thus should be deprecated before being removed from the codebase. This commit introduces a temporary `NonSymbolAccessDeprecatedHash` class that recursively wraps any nested hashes inside the `OrderedOptions` object returned from `config_for` and issues a deprecation notice when a non-symbol based access is performed. This way, apps that are still relying on the ability to access these nested hashes using non-symbol keys will be able to observe the deprecation notices and have time to implement changes before non-symbol access is removed for good. A CHANGELOG entry is also added to note that non-symbol access to nested `config_for` hashes is deprecated.
* | | | | Merge pull request #35221 from ↵Rafael França2019-02-111-2/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | alkesh26/railities-namespaces-to-paths-optimization Optimized namespaces_to_paths method.
| * | | | Optimized namespaces_to_paths method.alkesh262019-02-111-2/+3
|/ / / /
* | | | Merge pull request #35196 from gmcgibbon/clarify_collection_proxy_docsGannon McGibbon2019-02-112-11/+25
|\ \ \ \ | | | | | | | | | | Clarify collection proxy docs
| * | | | Clarify collection proxy docsGannon McGibbon2019-02-082-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs for `ActiveRecord::Associations::CollectionProxy` describe `ActiveRecord::Associations::Association`. I've moved them to association and rewrote collection proxy's docs to be more applicable to what the class actually does.` [ci skip]
* | | | | Revert "Merge pull request #35216 from CHTJonas/patch-1"Ryuta Kamizono2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b46601b56d94a02d944ed9bd9494aeea9cba98c8, reversing changes made to 4e6737f18ab8f0d0e9fbe6f73a92e5d29f1c68f1.
* | | | | Add `remove_foreign_key` for `change_table`Ryuta Kamizono2019-02-112-0/+22
| | | | |
* | | | | Merge pull request #35216 from CHTJonas/patch-1Eileen M. Uchitelle2019-02-111-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Correct JavaScript guide example
| * | | | | Correct JavaScript example in guide [ci skip]Charlie Jonas2019-02-101-1/+1
| | | | | | | | | | | | | | | | | | Swap `#users` jQuery selector to correct position and prevent the escaping of HTML.
* | | | | | Merge pull request #35184 from y-yagi/avoid_extra_package_installMatthew Draper2019-02-1110-16/+38
|\ \ \ \ \ \ | | | | | | | | | | | | | | Avoid extra package install
| * | | | | | Install JavaScript packages before run testyuuji.yaginuma2019-02-1110-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests are running yarn install during the test. The directory used for isolation test is not subject to yarn workspace, and it occurs because the required package is not installed. In order to avoid this, I fixed all necessary packages to be installed before run test and use symlink to `node_modules`. This is a bit complicated, as `yarn install` needs to be run in a specific directory before running the test. However, running `yarn install` every time run the test is expensive when testing locally and should be avoided.
* | | | | | | Fix typo a -> an, an -> a [ci skip]Ryuta Kamizono2019-02-114-4/+4
| | | | | | |
* | | | | | | Merge pull request #35212 from kamipo/sqlite3_foreign_keyRyuta Kamizono2019-02-1112-24/+83
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SQLite3: Implement `add_foreign_key` and `remove_foreign_key`
| * | | | | | | Revert "Merge pull request #33563 from lzap/foreign-key-note-doc"Ryuta Kamizono2019-02-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 141f50ef9ee6ce26820549e9f5b4629ddee182ce, reversing changes made to 317efa5c3593b70e9cc9a2fcb67488a302b71731. Reason: `add_foreign_key` and `remove_foreign_key` are implemented at #35212. [ci skip]
| * | | | | | | SQLite3: Implement `add_foreign_key` and `remove_foreign_key`Ryuta Kamizono2019-02-1111-21/+83
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I implemented Foreign key create in `create_table` for SQLite3 at #24743. This follows #24743 to implement `add_foreign_key` and `remove_foreign_key`. Unfortunately SQLite3 has one limitation that `PRAGMA foreign_key_list(table-name)` doesn't have constraint name. So we couldn't implement find/remove foreign key by name for now. Fixes #35207. Closes #31343.
* | | | | | | More exercise table name prefix and suffix testsRyuta Kamizono2019-02-115-33/+97
| | | | | | |
* | | | | | | Revert "Merge pull request #35211 from y-yagi/fix_broken_association_test" ↵Yuji Yaginuma2019-02-111-16/+0
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#35217) This reverts commit 38f9e41f2c4b64377ffb036c53873dbfb51546cf, reversing changes made to 5e493c3b839f10d639f5cce1f1b9ff9292702821. Reason: The ajv@6.9.1 was released that fixes issue.
* | | | | | Merge pull request #35211 from y-yagi/fix_broken_association_testYuji Yaginuma2019-02-101-0/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Avoid ajv@6.9.0 for now
| * | | | | | Avoid ajv@6.9.0 for nowyuuji.yaginuma2019-02-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because ajv@6.9.0 does not work with webpack. Ref: https://github.com/epoberezkin/ajv/issues/941
* | | | | | | Fix random CI failure due to non-deterministic sorting orderRyuta Kamizono2019-02-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://travis-ci.org/rails/rails/jobs/491045821#L1528-L1531
* | | | | | | Merge pull request #35203 from chiastolite/add_column_without_column_namesRyuta Kamizono2019-02-102-0/+12
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | Do not allow to add column without column name
| * | | | | | Do not allow to add column without column nameHiroyuki Morita2019-02-102-0/+10
| | | | | | |
* | | | | | | Merge pull request #35201 from rails/no-leaks2Aaron Patterson2019-02-098-20/+60
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix memory leaks in development
| * | | | | | Always call superAaron Patterson2019-02-083-3/+1
| | | | | | |
| * | | | | | reuse details cache key identity objectAaron Patterson2019-02-081-5/+1
| | | | | | |
| * | | | | | Teach DetailsKey how to clear the template cacheAaron Patterson2019-02-085-11/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit exposes all system wide view paths so that we can clear their caches.
| * | | | | | Split digest cache from details identity cacheAaron Patterson2019-02-084-8/+27
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | This commit splits the digest cache from the "details identity" cache. Now both caches can be managed independently.
* | | | | | Refactor to extract defining column methods as `define_column_methods`Ryuta Kamizono2019-02-093-142/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes to ease to handle all short-hand methods (e.g. validates arguments etc).
* | | | | | Fix rubocop violationsyuuji.yaginuma2019-02-092-11/+9
| | | | | |