Commit Graph

8423 Commits

Author SHA1 Message Date
Rafael Mendonça França
ef4841eac8
Update link to the security announcements list 2023-03-14 17:46:06 +00:00
zzak
1b4ea69789
Convert Entryable comment definition to HTML table 2023-03-13 14:33:19 +09:00
Koichi ITO
383981b932 Update GitHub organization of Minitest [ci skip]
https://github.com/seattlerb/minitest is changed to
https://github.com/minitest/minitest.
2023-03-12 03:23:44 +09:00
Xavier Noria
3531ca6853 Iterate instructions for custom namespaces in Rails < 7.1 2023-03-11 06:43:40 +01:00
Xavier Noria
40f35dda59 Fixes typo 2023-03-06 19:12:02 +01:00
Xavier Noria
930dddb329 Edits to the autoloading guide 2023-03-06 18:59:38 +01:00
Xavier Noria
779c14bf16 Edits in example code and railties CHANGELOG 2023-03-06 13:20:58 +01:00
Xavier Noria
87f3f811a7 Improve support for custom namespaces 2023-03-05 21:35:51 +01:00
Lee Sheppard
cc0951dbb8
Update Asset Pipeline Guideline reference to Sass gem (#47491)
* Update Asset Pipeline guide refs to Sass gem

Sassc-rails gem is no longer maintained. Sass is now compiled by Dart. The new dartsass-rails gem wraps the standalone release of the Dart version of Sass.

* Update asset_pipeline.md

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
2023-03-04 17:06:15 +01:00
Rafael Mendonça França
9f60cd8dc7
Merge PR #45463 2023-03-03 22:58:01 +00:00
Rafael Mendonça França
35d574dbfd
Merge pull request #47569 from p8/activemodel/add-model-name-to-missing-attribute-error
Add class name to ActiveModel::MissingAttributeError error message
2023-03-03 17:50:26 -05:00
Rafael Mendonça França
fee2bf3f80
Revert "Remove deprecated children and parent_of? on ActiveSupport::Notifications::Event"
This reverts commit 29679df058e057cdb75e0978204b576d86dfb4fb.

This method was deprecated in 7.1, so shouldn't be removed until 7.2.
2023-03-03 22:38:21 +00:00
Petrik
661c995f3b Add class name to ActiveModel::MissingAttributeError error message.
When an attribute is missing the current message is unclear about which
class is missing the attribute, especially when there are multiple
classes that could miss the attribute.

By adding the classs name to the error message it is easier to debug:

```ruby
user = User.first
user.pets.select(:id).first.user_id
=> ActiveModel::MissingAttributeError: missing attribute 'user_id' for Pet
```

This also makes the error message more inline with the
UnknownAttributeError message:

```ruby
=> ActiveModel::UnknownAttributeError: unknown attribute 'name' for Person
```

Co-authored-by: Yasuo Honda <yasuo.honda@gmail.com
2023-03-03 14:31:22 +01:00
Shouichi Kamiya
f67398fe70 Clarify AS::Representations::RedirectController processes files [skip ci]
Co-authored-by: zzak <zzakscott@gmail.com>
2023-03-03 14:33:32 +09:00
Alex Ghiculescu
0d7a6f50e7 Update Rails welcome image in guides
ref: https://github.com/rails/rails/pull/47550#issuecomment-1452756945
2023-03-02 18:07:45 -07:00
Rafael Mendonça França
18e53fbb2c
Remove deprecated purge and purge_later methods from the attachments association 2023-03-03 00:38:43 +00:00
Rafael Mendonça França
c720b7eba8
Remove deprecated behavior when assigning to a collection of attachments 2023-03-03 00:38:42 +00:00
Rafael Mendonça França
0591de55af
Remove deprecated ActiveStorage::Current#host and ActiveStorage::Current#host= methods 2023-03-03 00:38:41 +00:00
Rafael Mendonça França
4edaa4120b
Remove deprecated invalid default content types in Active Storage configurations 2023-03-03 00:38:40 +00:00
Rafael Mendonça França
8241178723
Remove deprecated support to instance variables as locals to partials 2023-03-03 00:38:39 +00:00
Rafael Mendonça França
23344d4b8c
Remove deprecated constant ActionView::Path 2023-03-03 00:38:37 +00:00
Rafael Mendonça França
7b4affc78b
Remove deprecated support to generate incorrect RFC 4122 UUIDs 2023-03-03 00:38:36 +00:00
Rafael Mendonça França
29679df058
Remove deprecated children and parent_of? on ActiveSupport::Notifications::Event 2023-03-03 00:38:35 +00:00
Rafael Mendonça França
f02998d2b5
Remove implicit conversion of objects into String by ActiveSupport::SafeBuffer 2023-03-03 00:38:34 +00:00
Rafael Mendonça França
f0ddb7709b
Remove deprecated active_support/core_ext/range/include_time_with_zone file 2023-03-03 00:38:33 +00:00
Rafael Mendonça França
da8e6f6175
Remove deprecated active_support/core_ext/uri file 2023-03-03 00:38:32 +00:00
Rafael Mendonça França
34e296d492
Remove deprecated override of ActiveSupport::TimeWithZone.name 2023-03-03 00:38:31 +00:00
Rafael Mendonça França
e420c3380e
Remove deprecated option to passing a format to #to_s 2023-03-03 00:38:30 +00:00
Rafael Mendonça França
4eb6441dd8
Remove deprecated ActiveSupport::PerThreadRegistry 2023-03-03 00:38:28 +00:00
Rafael Mendonça França
049dfd4ccf
Remove deprecated Tasks::DatabaseTasks.schema_file_type 2023-03-03 00:38:27 +00:00
Rafael Mendonça França
3ec629784c
Remove deprecated override of Enumerable#sum 2023-03-03 00:38:26 +00:00
Rafael Mendonça França
96b9fd6f14
Remove deprecated config.active_record.partial_writes 2023-03-03 00:38:25 +00:00
Rafael Mendonça França
96c9db1b48
Remove deprecated ActiveRecord::Base config accessors 2023-03-03 00:38:24 +00:00
Rafael Mendonça França
696ccbc265
Remove deprecated poltergeist and webkit (capybara-webkit) driver registration for system testing 2023-03-03 00:38:23 +00:00
Rafael Mendonça França
1e70d0f5d3
Remove deprecated ability to assign a single value to config.action_dispatch.trusted_proxies 2023-03-03 00:38:22 +00:00
Rafael Mendonça França
689b277733
Remove deprecated behavior on Request#content_type 2023-03-03 00:38:21 +00:00
Carlos Antonio da Silva
7cf65bc335
Merge pull request #47557 from swanson/swanson/remove-macports
Remove references to MacPorts setup
2023-03-02 14:17:31 -03:00
Matt Swanson
6bd9ce40c1 Remove references to macports setup 2023-03-02 10:43:30 -05:00
Lázaro Nixon
bde99e52ad
Install dartsass-rails when generating app with sass (#47545) 2023-03-01 06:51:29 +01:00
eileencodes
232aed8504
Allow configs_for to accept a custom hash key
Now that we support a way to register custom configurations we need to
allow applications to find those configurations. This change adds a
`config_key` option to `configs_for` to find db configs where the
configuration_hash contains a particular key.

I have also removed the deprecation for `include_replicas` while I was
in here to make the method signature cleaner. I've updated the upgrade
guide with the removal.
2023-02-28 12:12:08 -05:00
Jeffrey Hardy
4d2eeafa70 Update Action Mailer's deliver_later_queue_name documentation with current defaults
Since Rails 6.1, the default configuration has been to use Active Job's default
queue, achieved by setting the queue name to `nil`.

Refs:
- https://github.com/rails/rails/pull/47408
- https://github.com/rails/rails/pull/47408#discussion_r1118672914
2023-02-27 12:42:14 -05:00
Étienne Barrié
9cfa5e07fd Remove sentence about the namespace of deprecation notification events
All Rails frameworks deprecators have "Rails" as their `gem_name`, and
the `:notify` behavior emits events based on that, so all frameworks
emit their deprecations under the `rails` namespace.

For example: activesupport/lib/active_support/deprecator.rb:5
activesupport/lib/active_support/deprecation.rb:42
activesupport/lib/active_support/deprecation/behaviors.rb:39
2023-02-27 11:24:53 +01:00
Jorge Manrubia
5d7b6d823f
Add option to configure digest algorithm used by Active Record Encryption (#44873)
Before, it was using the configured by Rails. Having a mechanism to configure it
for Active Record encryption makes sense to prevent problems with encrypted content
when the default in Rails changes.

Additionally, there was a bug making AR encryption use the older SHA1 before
`ActiveSupport.hash_digest_class` got initialized to SHA256. This bug was exposed
by https://github.com/rails/rails/pull/44540. We will now set SHA256 as the standard
for 7.1+, and SHA1 for previous versions.
2023-02-27 10:16:41 +01:00
Jon Dufresne
da82e587f2 Improve typography of user facing validation messages
With the universal adoption of UTF-8 in browsers, user facing text can
use more optimal Unicode typography. In digital and print design, using
RIGHT SINGLE QUOTATION MARK (U+2019) is normally preferred over
APOSTROPHE (U+0027) in contractions.

For details, see the Unicode Standard Section 6.2:
https://www.unicode.org/versions/Unicode13.0.0/ch06.pdf

> Punctuation Apostrophe. U+2019 right single quotation mark is
> preferred where the character is to represent a punctuation mark, as
> for contractions: “We’ve been here before.” In this latter case,
> U+2019 is also referred to as a punctuation apostrophe.
2023-02-25 08:21:19 -08:00
Jean Boussier
cee15555c9 Stop serializing columns as YAML by default
YAML is great for configuration and such, but for serializing arbitrary
data it has many problem, both in term of performance and efficiency
but also in term of security.

As such, we shouldn't let it be the default.

The open question is wether we should provide another default, or
just let users chose what they want based on their own tradeoffs.

Many people would probably suggest JSON as the new default, unfortunately
I don't think it's a good fit either because the parsers available in
Ruby have some wonky behaviors:

```ruby
>> ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(Object.new))
=> {}
>> JSON.load(JSON.dump(Object.new))
=> "#<Object:0x000000012b61a068>"
```

If we were to select another default, I beleive it would need several
properties:

  - It should only serialized a safe list of primitive types.
  - It should explictly raise if attempting to serialize complex types.
2023-02-24 08:55:04 +01:00
Eugene Kenny
6d2e4de19b Sort the results of Dir.glob [ci skip]
Followup to 40143bf9d032fbc0081384f00edb5ca1d600068f.
2023-02-23 08:25:07 +00:00
Peter Boling
40143bf9d0
Dir.glob result must be sorted
Otherwise it is non-deterministic
2023-02-22 22:01:52 -07:00
Carlos Antonio da Silva
c4b050984a Fix a couple typos and revise sentence on new column serializer docs
[ci skip]
2023-02-22 20:05:05 -03:00
Jean Boussier
185f2d718d Allow to define the default column serializer
YAML has quite a bit of footguns, as such it's desirable
to be able to substitute it for something else or even
simply to force users to define a serializer explictly for
every serialized columns.
2023-02-22 19:32:28 +01:00
zzak
ed95240dab
Add "Rails Application Templates" to guides index, as WIP 2023-02-22 18:20:10 +09:00