Commit Graph

6723 Commits

Author SHA1 Message Date
John Bampton
c02068bad8 docs: fix grammar and spelling [ci skip] 2021-04-15 18:51:29 +10:00
John Bampton
1825c2b6c5 chore: fix spelling 2021-04-15 15:49:48 +10:00
Zachary Scott
9e1cdf27eb
Merge pull request #41894 from braingourmets/task/getting-started-6.1
Update the "getting started" guide to Rails 6.1
2021-04-15 06:39:10 +09:00
Jason Barnabe
92c6f41cdb
Document that S3 requires s3:PutObjectAcl for public access [ci skip] 2021-04-14 14:13:07 -04:00
Oliver Klee
36b7008a9b
Update the "getting started" guide to Rails 6.1
This hopefully will reduce confusion for developers who use the
current Rails version.

[ci skip]
2021-04-14 18:38:09 +02:00
Zachary Scott
43e29f0f5d
Merge pull request #41945 from jbampton/fix-grammar
chore: fix grammar, spelling and minor whitespace fix
2021-04-14 09:19:15 +09:00
John Bampton
debab67a85 Lint Markdown blank lines around headings [ci-skip] 2021-04-14 01:17:46 +10:00
John Bampton
dcd0544aed docs: lint Markdown for four rules
- extra whitespace
- markup
- missing "alt" attribute
- trailing whitespace
2021-04-14 00:36:03 +10:00
John Bampton
54e526e473 chore: fix grammar, spelling and minor whitespace fix 2021-04-13 21:35:50 +10:00
John Bampton
285d7d4eaf docs: change user name to the more used username
Remove an unneeded comma
2021-04-13 15:54:49 +10:00
Jonathan Hefner
ec5c9a8fcd
Merge pull request #41875 from jacobherrington/grammar-and-clarity-edit-contributing-guide
Fix grammar and clarity in the contributing guide [ci skip]
2021-04-12 17:42:16 -05:00
Jacob Herrington
65cab6c48a
Fix grammar and clarity [ci skip]
Co-authored-by: Petrik de Heus <petrik@deheus.net>
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2021-04-12 17:37:50 -05:00
Avidor Turkewitz
4c1cf12ab1
Fix HTML tag mismatches in Action Text README [ci skip] 2021-04-12 17:42:13 -04:00
Rafael França
32db8149ed
Merge pull request #41926 from jbampton/fix-favorite
chore: fix spelling change `favourite` to the more used `favorite`
2021-04-12 16:14:56 -04:00
Hartley McGuire
7bfcf4b313 Remove Rack::Runtime and deprecate referencing it
Previous discussion: #38412, #38325, 37423e4, 24f9c03

- Rack::Runtime is replaced by FakeRuntime, which is a dummy middleware
  that just passes requests on and cannot be used in middleware operations
- Using Rack::Runtime in middleware operations (relative inserts, moves,
  etc.) throws a deprecation warning and uses FakeRuntime instead
- if an application adds Rack::Runtime explicitly (use, unshift, etc.),
  then the deprecation warning does not happen and FakeRuntime is
  ignored
- docs are updated to no longer reference Rack::Runtime
2021-04-12 14:31:12 -04:00
John Bampton
11557e6cec chore: fix spelling change favourite to the more used favorite 2021-04-12 12:35:12 +10:00
John Bampton
b97b4fa207 docs: fix missing HTTPS on links [ci-skip] 2021-04-12 09:45:13 +10:00
Ryuta Kamizono
54979ffa25
Merge pull request #41916 from jbampton/fix-spelling
chore: fix grammar and spelling
2021-04-12 07:26:23 +09:00
John Bampton
542dd9a062 fix whitespace Markdown headings active_record_encryption.md [ci-skip] 2021-04-12 07:51:55 +10:00
John Bampton
6f424731c7 docs: fix XML example in active_storage_overview.md [ci-skip] 2021-04-12 07:24:33 +10:00
John Bampton
13b1d9dc35 chore: fix grammar and spelling 2021-04-12 05:30:44 +10:00
John Bampton
6cf394c236 chore: fix i.e. typos in Markdown and Ruby
i.e. is the customary abbreviation for "that is." It is derived from the Latin term "id est."
2021-04-12 03:30:55 +10:00
John Bampton
372dae73ed docs: fix e.g. typo in debugging_rails_applications.md
e.g. is the abbreviation for the Latin phrase exempli gratia, meaning “for example.” This abbreviation is typically used to introduce one or more examples of something mentioned previously in the sentence and can be used interchangeably with “for example” or “such as.”
2021-04-12 02:08:21 +10:00
Henrik Nyh
ad654a8dd3
Encryption guide copy fixes [ci skip]
Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
2021-04-08 16:39:04 -04:00
eileencodes
634bf89df3
Deprecate legacy_connection_handling
This deprecates `legacy_connection_handling` via the
`connection_handlers` setter. This is called from the ActiveRecord
Railtie on boot and since most applications don't set this themselves
this will prevent the deprecation from being raised multiple times for a
test run or in development.

I've also updated the guides to include a migration path for
applications using the deprecated methods. The majority of applications
won't need to make any changes.
2021-04-06 18:57:22 -04:00
Carlos Antonio da Silva
e63f8205d1 Tweak AR Encryption guide for better highlighting [ci skip] 2021-04-02 11:04:28 -03:00
Ryuta Kamizono
1251703c4d Fix typo [ci skip] 2021-04-02 14:38:00 +09:00
Sampat Badhe
2032daa415
Fix typos encryption doc (#41817)
* fix typo

[ci skip]
2021-04-02 14:24:43 +09:00
Jorge Manrubia
3648c25cad Minor encryption guide tweaks and corrections 2021-04-01 14:52:42 -07:00
Jeremy Daer
07c3eee478
Merge pull request #41659 from basecamp/active-record-encryption
Add encryption to Active Record
2021-04-01 14:14:38 -07:00
Guillermo Iguaran
3583d82ea2
Merge pull request #41812 from rokbot/fix/guides-mailer-basics
[ci skip] fix on guides mailer_basics avoid ActiveModel::ForbiddenAttributesError
2021-04-01 13:26:30 -07:00
Jorge Manrubia
e24fb5524a Validate that proper keys are configured when declaring attributes
This enables to disable deterministic encryption by just not setting
deterministic_key.
2021-04-01 18:20:54 +02:00
Jorge Manrubia
575a2c6ce0 Fix credential typo in Guide 2021-04-01 15:07:12 +02:00
Jorge Manrubia
fd91dac6f4 Add note about action text 2021-04-01 15:02:15 +02:00
Jorge Manrubia
f78a480818 Encourage deterministic encryption to remain unchanged
This implements several changes to encourage deterministic encryption to
remain unchanged. The main motivation is letting you define unique
indexes on deterministically-encrypted columns:

- By default, deterministic encryption will always use the oldest
encryption scheme to encrypt new data, when there are many.
- You can skip this default behavior and make it always use the current
encryption scheme with:

```ruby
deterministic: { fixed: false } # using this should be a rare need
```

- Deterministic encryption still supports previous encryption schemes
normally. So they will be used to add additional values to queries, for
example.
- You can't rotate deterministic encryption keys anymore. We can add
support for that in the future.

This makes for reasonable defaults:

- People using "deterministic: true" will get unique indexes working out
of the box.
- The system will encourage keeping deterministic encryption stable:
  - By always using oldest encryption schemes
  - By forbidding configuring multiple keys

But you can still opt-out of the default if you need to.
2021-04-01 15:02:15 +02:00
Jorge Manrubia
7a1fb99302 Add support to declare previous encryption schemes globally 2021-04-01 15:02:15 +02:00
Jorge Manrubia
28145c3cee Rename master_key => primary_key 2021-04-01 15:02:15 +02:00
Jorge Manrubia
fd3fbcc4eb Update guides/source/active_record_encryption.md
Co-authored-by: Connor Shea <connor.james.shea@gmail.com>
2021-04-01 15:02:15 +02:00
Jorge Manrubia
212543deb5 Update guide 2021-04-01 15:02:14 +02:00
Jorge Manrubia
209e62c938 Update guide 2021-04-01 15:02:14 +02:00
Jorge Manrubia
4e1f66f90b Add config options 2021-04-01 15:02:14 +02:00
Jorge Manrubia
795b1c654a Allow list explicit list of allowed properties
The alternative is more brittle
2021-04-01 15:02:14 +02:00
Jorge Manrubia
9aca274042 Encryption guide (WIP) 2021-04-01 15:02:13 +02:00
Brian Buchalter
6be9c498bc Provide context when logging unpermitted parameters
Currently, the payload of the unpermitted_parameters.action_controller
events emitted by StrongParameters does not provide enough information for
developers to understand which controller and action received the
unpermitted parameters. This PR modifies ActionController::Parameters to
allow callers to specify a "context" which is included in the logging
payload.

*Implementation Strategy*
Since the ActionController::Parameters class is only loosely coupled
with controllers and can technically be used in any context, this PR
expects the caller to provide logging context.

Since StrongParameters is caller in Rails and has access to the
request object I chose to provide a payload similar to the
start_processing.action_controller event.
2021-03-31 17:15:23 -06:00
Roderick Bompart
2d4006aece fix on guides mailer_basics avoid ActiveModel::ForbiddenAttributesError 2021-03-31 10:51:10 -04:00
Rafael França
e9268f73aa
Merge pull request #41791 from benkoshy/update-action-mailbox-documentation
Add: link to documentation [ci-skip]
2021-03-30 23:10:14 -04:00
BK
178b22f970 Add: link to documentation
Update guides/source/action_mailbox_basics.md

Co-authored-by: Rafael França <rafael@franca.dev>
2021-03-31 10:33:03 +11:00
Alex Ghiculescu
b9dfa21fbd
Document config.require_master_key [docs] [ci-skip] 2021-03-29 10:57:29 -05:00
Ryuta Kamizono
af4ca424eb Follow up to #41765 [ci skip] 2021-03-28 10:55:35 +09:00
Jason Barnabe
345384fb1f
Specifiy association :validate option only applies to new associated objects
Per [code comments](6daa2d8315/activerecord/lib/active_record/associations.rb (L1418-L1420)), the `:validate` option only makes a difference for *new* objects. Existing objects are not validated, regardless of the setting.
2021-03-25 15:04:45 -05:00