aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Specify a name for [ message_id, message_checksum ] index to ensure the name ↵Pratik Naik2019-01-173-8/+8
| | | | | | does not exceed the limit. Also, update test schema to reflect the recent changes.
* Ensure Action Mailbox processes an email only once when received multiple timesPratik Naik2019-01-176-15/+44
| | | | | | | This also adds a new column, message_checksum, to the action_mailbox_inbound_emails table for storing SHA1 digest of the email source. Additionally, it makes generating the missing message id deterministic and adds a unique index on message_checksum and message_id to detect duplicate emails.
* Merge pull request #34953 from gmcgibbon/seed_with_inline_jobsRafael França2019-01-173-1/+29
|\ | | | | Seed database with inline ActiveJob job adapter
| * Seed database with inline ActiveJob job adapterGannon McGibbon2019-01-173-1/+29
| |
* | Merge pull request #34213 from matildasmeds/guides_session_guidelines_2Rafael França2019-01-171-68/+31
|\ \ | | | | | | Edit Security Guide's Session Guidelines & Custom Credentials [skip ci]
| * \ Merge branch 'master' into guides_session_guidelines_2Matilda Smeds2018-12-09473-9721/+14396
| |\ \
| * | | Update guides/source/security.mdDerek Prior2018-10-181-1/+1
| | | |
| * | | Update guides/source/security.mdDerek Prior2018-10-181-1/+1
| | | |
| * | | Edit Security Guide's Session Guidelines & Custom Credentials [skip ci]Matilda Smeds2018-10-141-68/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Edit Session Guidelines to achieve tighter prose and accuracy * Remove mentions related to earlier Rails versions * Add links to ActionController guide and Custom Credentials part * Clarify Custom Credentials part
* | | | Merge pull request #33419 from bogdanvlviv/update-active_storageGeorge Claghorn2019-01-166-1/+31
|\ \ \ \ | | | | | | | | | | `rake app:update` should update active_storage
| * | | | Add foreign key to active_storage_attachments for `blob_id` via new migrationbogdanvlviv2019-01-166-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need this in order to be able to add this migration for users that use ActiveStorage during update their apps from Rails 5.2 to Rails 6.0. Related to #33405 `rake app:update` should update active_storage `rake app:update` should execute `rake active_storage:update` if it is used in the app that is being updated. It will add new active_storage's migrations to users' apps during update Rails. Context https://github.com/rails/rails/pull/33405#discussion_r204239399 Also, see a related discussion in the Campfire: https://3.basecamp.com/3076981/buckets/24956/chats/12416418@1236713081
* | | | | Add a space in framework names. Matches Active Record in generated Gemfile.Kasper Timm Hansen2019-01-161-2/+2
| | | | |
* | | | | Merge pull request #34941 from rmacklin/allow-actioncable-to-run-in-web-workersJavan Makhmali2019-01-164-12/+12
|\ \ \ \ \ | | | | | | | | | | | | Avoid ReferenceError exceptions if ActionCable is used in a web worker
| * | | | | Remove explicit `document` receiver from add/removeEventListener callsRichard Macklin2019-01-152-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows ActionCable to be used in a web worker, where the `document` global is undefined. Previously, attempting to use ActionCable inside a web worker would result in this exception after you try to open a connection: ``` ReferenceError: document is not defined ``` The visibilitychange event won't ever get triggered in a worker, so adding the listener is effectively a no-op there. But the listener is mainly a convenience, rather than a critical piece of the javascript interface, so using ActionCable in a worker will still work. (And you could listen for visibilitychange yourself in a window script, then tell the worker to reconnect if you still want that behavior.)
| * | | | | Replace `window` references in ActionCable with `self`Richard Macklin2019-01-143-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, attempting to use ActionCable inside a web worker would result in an exception being thrown: ``` ReferenceError: window is not defined ``` By replacing the `window` reference with `self`, which is available in both a window context and a worker context, we can avoid this error. Ref: https://developer.mozilla.org/en-US/docs/Web/API/Window/self
* | | | | | Merge pull request #34949 from javan/js/compact-startJavan Makhmali2019-01-168-23/+14
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Minimize boilerplate setup code for JavaScript libraries
| * | | | | Minimize boilerplate setup code for JavaScript librariesJavan Makhmali2019-01-168-23/+14
|/ / / / /
* | | | | Merge pull request #34832 from gmcgibbon/db_system_change_commandKasper Timm Hansen2019-01-1612-89/+378
|\ \ \ \ \ | | | | | | | | | | | | Add rails db:system:change command
| * \ \ \ \ Merge branch 'master' into db_system_change_commandKasper Timm Hansen2019-01-16129-1059/+1750
| |\ \ \ \ \ | |/ / / / / |/| | | | |
* | | | | | 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
| | | | | | | |