aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #34947 from bogdanvlviv/actioncable-testing-34933Kasper Timm Hansen2019-01-166-13/+22
|\ | | | | Add `rails test:channels` and fix Action Cable templates
| * Add `rails test:channels`.bogdanvlviv2019-01-163-3/+18
| | | | | | | | | | Add this rake task to test channels only. We've added `rails test:mailboxes` recently in the same way #34828.
| * Remove `frozen_string_literal` from Action Cable's template filesbogdanvlviv2019-01-163-10/+4
| | | | | | | | | | | | Related to 837f602fa1b3281113dac965a8ef96de3cac8b02 Fix the testing guide.
* | Require hash/keys inside active_model/callbacksRafael Mendonça França2019-01-161-0/+1
| | | | | | | | | | | | | | | | | | This file uses assert_valid_keys but it was not being required. You can reproduce this error with a script that uses this feature by using those requires: require 'active_model' require 'active_model/callbacks'
* | Merge pull request #34944 from dasch/patch-7Rafael França2019-01-161-0/+8
|\ \ | | | | | | Document that `format.any` can match all formats
| * | Document that `format.any` can match all formatsDaniel Schierbeck2019-01-161-0/+8
| | | | | | | | | I had to dig around the code to discover this, since I had a use case for the behavior.
* | | Merge pull request #34946 from mdesantis/remove-decorator-pattern-referencesRafael França2019-01-161-11/+10
|\ \ \ | | | | | | | | Engines guide: remove Decorator pattern references in Overriding existing classes examples
| * | | Remove Decorator pattern in Overriding existing classes examplesMaurizio De Santis2019-01-161-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Engines guide in the Overriding Models and Controllers section references the Decorator pattern, which isn't appropriate, since Decorator pattern is not about reopening existing classes, is about adding functionality to existing object instances; something that in Ruby is commonly implemented using Delegators. Moreover, the suggested naming convention for overrides, `app/decorators/**/*_decorator*.rb`, conflicts with a naming convention commonly used for View Model / Presentation Model decorators, adopted by popular gems such as `draper`, as well as by custom implementations.
* | | | Merge pull request #34948 from colorbox/fix_formatting_in_action_mailbox_docsRafael França2019-01-1611-48/+48
|\ \ \ \ | | | | | | | | | | Fix document formatting on ActionMailbox [ci skip]
| * | | | Fix document formatting on ActionMailbox [ci skip]colorbox2019-01-1711-48/+48
| | |_|/ | |/| | | | | | | | | | Use `+` instead of backquote.
* / | | Revert "Don't handle params option in a special way in url_for helper"Rafael Mendonça França2019-01-165-5/+14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e385e4678fc64be6e176c3bdac6641db9fe48d85. While this option was undocumented it exists to make possible to pass parameters to the route helpers that are reserved like `:domain`. While `url_for(domain: 'foo.com')` would generate a URL in the `foo.com` domain `url_for(params: { domain: 'foo.com' })` would generate a URL with `?domain=foo.com`.
* | | Merge pull request #34943 from ikepon/add_null_false_to_actionmailbox_tableGeorge Claghorn2019-01-161-2/+2
|\ \ \ | |_|/ |/| | Add `null: false` to `created_at` and `updated_at` columns in Action Mailbox table
| * | Add 'null: false' to Action Mailbox tableikepon2019-01-161-2/+2
|/ / | | | | | | created_at and updated_at columns in Action Mailbox table aren't intended nullable.
* | Exercise Active Storage and Action Text in verification app.Kasper Timm Hansen2019-01-151-3/+42
| | | | | | | | | | | | | | | | | | Allows the releaser to verify that: - A rich text description can be edited and shown *richly*. - An image/PDF can be uploaded and generate a variant that's shown. Also moves the generated app to a tmp directory for less cleanup need.
* | Install Action Mailbox and Action Text when verifying release.Kasper Timm Hansen2019-01-151-0/+2
|/
* Refs #28025 nullify *_type column on polymorphic associations on :nu… ↵Laerti2019-01-1510-6/+65
| | | | | | (#28078) This PR addresses the issue described in #28025. On `dependent: :nullify` strategy only the foreign key of the relation is nullified. However on polymorphic associations the `*_type` column is not nullified leaving the record with a NULL `*_id` but the `*_type` column is present.
* Remove public `prevent_writes` writerRyuta Kamizono2019-01-151-5/+5
| | | | | | The `@prevent_writes` should be updated only in the `while_preventing_writes`, it is not necessary to expose the attr writer.
* Deprecate `connection.visitor = ...` which is not released internal usageRyuta Kamizono2019-01-151-2/+6
| | | | | | | | | This attr writer was introduced at 7db90aa, but the usage is already removed at bd2f5c0 before v3.2.0.rc1 is released. If we'd like to customize the visitor in the connection, `arel_visitor` which is implemented in all adapters (mysql2, postgresql, sqlite3, oracle-enhanced, sqlserver) could be used for the purpose #23515.
* Remove unused `Arel::Compatibility::Wheres`Ryuta Kamizono2019-01-152-36/+0
| | | | This class is no longer used since 9cbfc8a370bf6537a02a2f21e7246dc21ba4cf1f.
* Merge pull request #34931 from ↵Rafael França2019-01-142-6/+6
|\ | | | | | | | | bogdanvlviv/add-mention-to-main-readme-about-new-libraries Add mention to the main README about new libraries [ci skip]
| * Add mention to the main README about new libraries [ci skip]bogdanvlviv2019-01-132-6/+6
| | | | | | | | Action Mailbox and Action Text belong to rails/rails since #34786 and #34873.
* | Merge pull request #34937 from rmacklin/document-actioncable-js-changesRafael França2019-01-142-0/+52
|\ \ | | | | | | Document the ActionCable JS changes in the upgrade guide and release notes
| * | Document the ActionCable JS changes in the upgrade guide & release notesRichard Macklin2019-01-142-0/+52
|/ /
* | Merge pull request #34891 from gmcgibbon/ac_params_existsRafael França2019-01-144-0/+31
|\ \ | | | | | | Allow strong params in ActiveRecord::Base#exists?
| * \ Merge branch 'master' into ac_params_existsAaron Patterson2019-01-11113-395/+704
| |\ \
| * | | Allow strong params in ActiveRecord::Base#exists?Gannon McGibbon2019-01-074-0/+30
| | | | | | | | | | | | | | | | | | | | Allow `ActionController::Params` as argument of `ActiveRecord::Base#exists?`
* | | | Refactor calculating beginning_of_quarter and end_of_quarter (#34927)Krzysztof Rybka2019-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Calculate first month of quarter instead of finding * Calculate last month of quarter instead of finding [Krzysztof Rybka + Rafael Mendonça França]
* | | | Merge pull request #34934 from ↵Rafael França2019-01-143-16/+19
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | rmacklin/simplify-actioncable-methods-after-decaffeination Clean up ActionCable JS a bit more after the CoffeeScript conversion
| * | | | Simplify `this.isActive() && this.webSocket` into `this.isActive()`Richard Macklin2019-01-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in Connection#close. We can do this because `isActive()` can only return `true` if `this.webSocket` is truthy. (We can't have an active connection without having instantiated a WebSocket. This is confirmed in the code: Connection#isActive calls Connection#isState which calls Connection#getState, which checks if `this.webSocket` is truthy and returns `null` otherwise.)
| * | | | Simplify ActionCable.getConfig, Connection#getProtocol, and Connection#closeRichard Macklin2019-01-143-7/+17
| | | | | | | | | | | | | | | | | | | | by relying on the implicit undefined return value
| * | | | Simplify ActionCable.createConsumer by using default argumentRichard Macklin2019-01-142-10/+3
| | | | |
* | | | | Merge pull request #33962 from kaspth/restructure-environment-credentialsKasper Timm Hansen2019-01-147-114/+122
|\ \ \ \ \ | | | | | | | | | | | | Restructure credentials after environment overrides.
| * | | | | Restructure credentials after environment overrides.Kasper Timm Hansen2019-01-147-114/+122
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to: e0d3313 - Revert renames from `encrypted` and `encrypted_file` back to `credentials`. They might be using our Encrypted* generators but from that level of abstraction they're still about credentials. - Same vein: extract a `credentials` method for the `encrypted` local variable. But don't call it `encrypted` just because it uses that under the hood. It's about capturing the credentials. It's also useful in `change_credentials_in_system_editor`. - Remove lots of needless argument passing. We've abstracted content_path and key_path into methods for a reason, so they should be used. Also spares a conspicuous rename of content_path into file_path in other methods. - Reorders private methods so they're grouped into: command building blocks, option parsers, and the generators. - Extracts commonality in the credentials application tests. A tad unsure about this. But I do like that we go with key, content thus matching the command and remove the yield which isn't really needed. - Moves test/credentials_test.rb to beneath the test/application directory. It's a Rails application test, so it should be in there. - Uses `root.join` — a neat trick gleaned from the tests! — and composes the configuration private methods such that the building block is below the callers.
* | | | | Merge pull request #34933 from palkan/feature/cable-testing-guidesKasper Timm Hansen2019-01-1413-5/+195
|\ \ \ \ \ | |/ / / / |/| | | | Add Action Cable testing guides and generators
| * | | | Add Action Cable Testing guidesVladimir Dementyev2019-01-145-4/+129
| | | | |
| * | | | Add connection_test to app generatorVladimir Dementyev2019-01-133-0/+18
| | | | |
| * | | | Add channel test generatorVladimir Dementyev2019-01-135-1/+48
|/ / / /
* | | | Update Action Cable connection testing.Kasper Timm Hansen2019-01-142-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't reimplement assert_raises Also test what happens in case there's no explicit rejection. * Avoid OpenStruct. Remove space beneath private. * Simplify verification methods for code under test. * Match documentation with other Rails docs. Also remove mention of the custom path argument for now. Unsure how useful that really is.
* | | | Merge pull request #34932 from ↵Ryuta Kamizono2019-01-141-8/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | bogdanvlviv/fix-action-cable-guide-follow-up-34709 Fix "Action Cable Overview" guide [ci skip]
| * | | | Fix "Action Cable Overview" guide [ci skip]bogdanvlviv2019-01-131-8/+8
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix path to channel files. `rails generate channel Chat` generates `app/javascript/channels/chat_channel.js`. See also, railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt, actioncable/lib/rails/generators/channel/templates/javascript/index.js.tt by default `application.js` imports "channels", where `app/javascript/channels/index.js` loads all the channels within this directory and all subdirectories. Follow up #34709 Related to #33079
* | | | Merge pull request #34930 from ↵Ryuta Kamizono2019-01-142-544/+31
|\ \ \ \ | |/ / / |/| | | | | | | | | | | bogdanvlviv/merge-actioncable-README.md-to-the-guide Merge `actioncable/README.md` to the Action Cable Overview guide [ci skip]
| * | | Merge `actioncable/README.md` to the Action Cable Overview guide [ci skip]bogdanvlviv2019-01-132-544/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #34709 we updated the guide, but `actioncable/README.md` is still outdated. Instead of fixing content in the file. I suggest not duplicate the info that is already in the guide and instead remove the info from the file and just add a message: "You can read more about Action Cable in the [Action Cable Overview](https://edgeguides.rubyonrails.org/action_cable_overview.html) guide." The same approach is being used for Action Mailbox and Action Text, see #34812 and #34878.
* | | | Merge pull request #34845 from palkan/feature/action-cable-connection-testingKasper Timm Hansen2019-01-133-0/+434
|\ \ \ \ | |/ / / |/| | | Add ActionCable::Connection::TestCase
| * | | feature: add ActionCable::Connection::TestCaseVladimir Dementyev2019-01-023-0/+434
| | | |
* | | | Add Exim and Qmail support to Action MailboxGeorge Claghorn2019-01-1210-68/+196
| | | |
* | | | More exercise test cases for `not_between`Ryuta Kamizono2019-01-122-31/+84
| |_|/ |/| | | | | | | | | | | | | | And support endless ranges for `not_between` like as `between`. Follow up #34906.
* | | Merge pull request #34906 from gregnavis/add-endless-ranges-to-activerecordAaron Patterson2019-01-113-2/+18
|\ \ \ | | | | | | | | Support endless ranges in where
| * | | Support endless ranges in whereGreg Navis2019-01-113-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for endless ranges, e.g. (1..), that were added in Ruby 2.6. They're functionally equivalent to explicitly specifying Float::INFINITY as the end of the range.
* | | | Merge pull request #34902 from ↵Gannon McGibbon2019-01-111-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | lanzhiheng/improve-doc-in-routing-2-10-adding-member-routes improve doc in `Adding Member Routes` section of routing chapter.
| * | | | [ci skip] improve doc in `Adding Member Routes` section of routing chapter.lanzhiheng2019-01-111-1/+1
| | | | |