Commit Graph

8687 Commits

Author SHA1 Message Date
Noah Gibbs
586c79d8b0
Mention composite primary keys for migrations and querying 2023-09-05 12:34:40 +01:00
Petrik de Heus
42db7f307f
Merge pull request #49126 from tnir/tn-guide-remove-classic-from-engines
Simplify explanation by removing docs for classic mode
2023-09-04 10:31:08 +02:00
Vipul A M
f324203923
Merge pull request #49125 from akhilgkrishnan/remove-webpacker-reference
[skip ci] Remove webpacker guide reference
2023-09-04 12:51:34 +05:30
Takuya Noguchi
258a908a0a Simplify explanation by removing docs for classic mode
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2023-09-04 06:29:33 +00:00
Akhil G Krishnan
4631788d0f [skip ci] Remove webpacker guide reference 2023-09-04 09:37:03 +05:30
Akhil G Krishnan
04e0b4bfc2 [skip ci] Description added for Active Record API for general async queries in 7.1 release note 2023-09-02 14:51:14 +05:30
Sean Doyle
e85a3ec624
Change has_secure_token default to on: :initialize
Follow-up to [#47420][]

With the changes made in [#47420][], `has_secure_token` declarations can
be configured to execute in an `after_initialize` callback. This commit
proposed a new Rails 7.1 default: generate all `has_secure_token` values
when their corresponding models are initialized.

To preserve pre-7.1 behavior, applications can set
`config.active_record.generate_secure_token_on = :create`.

By default, generate the value when the model is initialized:

```ruby
class User < ApplicationRecord
  has_secure_token
end

record = User.new
record.token # => "fwZcXX6SkJBJRogzMdciS7wf"
```

With `config.active_record.generate_secure_token_on = :create`, generate
the value when the model is created:

```ruby
 # config/application.rb
config.active_record.generate_secure_token_on = :create

 # app/models/user.rb
class User < ApplicationRecord
  has_secure_token on: :create
end

record = User.new
record.token # => nil
record.save!
record.token # => "fwZcXX6SkJBJRogzMdciS7wf"
```

[#47420]: https://github.com/rails/rails/pull/47420

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
2023-09-01 20:17:22 +00:00
Jean Boussier
9fd3d03dab
Merge pull request #49105 from Earlopain/ar-normalizes-where
Document `where` support for AR `normalizes`
2023-09-01 19:02:14 +02:00
Adrianna Chang
d3981d1840
Merge pull request #49103 from akhilgkrishnan/activemodel-notable-release-note
[skip ci] ActiveModel notable changes added to 7.1 release note
2023-09-01 12:50:10 -04:00
Akhil G Krishnan
369be4a723 [skip ci] ActiveModel notable changes added to 7.1 release note
[skip ci] review changes updated
2023-09-01 22:14:53 +05:30
Earlopain
830957e213
Document where support for AR normalizes
Also some other small changelog tweak:
* Add normalize_value_for to the activerecord changelog
* Fix a wrong method reference in the 7.1 release notes
2023-09-01 18:13:23 +02:00
Akhil G Krishnan
cd5c61a77b [skip ci] Description added for Allow templates to set strict locals in 7.1 release note 2023-09-01 20:12:47 +05:30
Rafael Mendonça França
96cc933044
Merge pull request #49097 from akhilgkrishnan/missing-markdown
[skip ci] Added the missing code block highlights in guides
2023-08-31 15:22:41 -04:00
Rafael Mendonça França
8b3dc1a06e
Merge pull request #49092 from akhilgkrishnan/trilogy-release-note
[skip ci] Trilogy description added for rails 7.1 release note
2023-08-31 15:15:33 -04:00
Rafael Mendonça França
9e461a3f15
Merge pull request #49094 from akhilgkrishnan/activejob-notable-release-note
[skip ci] ActionJob notable changes added to 7.1 release note
2023-08-31 15:03:37 -04:00
Akhil G Krishnan
e556a4a0e6 Added the missing codeblock highlights in guides
Rubocop fix
2023-08-31 21:51:04 +05:30
Akhil G Krishnan
62db35de39 [skip ci] ActionJob notable changes added to 7.1 release note 2023-08-31 11:32:23 +05:30
Akhil G Krishnan
a4e24b95f4 [skip ci] ActionView notable changes added to 7.1 release note 2023-08-31 10:50:30 +05:30
Akhil G Krishnan
d78e664a8f [skip ci] Trilogy description added for rails 7.1 release note 2023-08-31 10:28:02 +05:30
Ryuta Kamizono
c62a361d45
Merge pull request #49078 from ilyaabramovich/patch-1
Fix generated SQL in code example using .unscoped with block

[ci-skip]
2023-08-31 12:42:56 +09:00
Rafael Mendonça França
fccdc02cba
Merge pull request #49085 from akhilgkrishnan/actionmailbox-notable-release-note
[skip ci] ActionMailbox notable changes  added to 7.1 release note
2023-08-30 13:54:49 -04:00
Rafael Mendonça França
a408077fe1
Merge pull request #49086 from akhilgkrishnan/activerecord-release-notes
[skip ci] ActiveRecord notable changes, deprecations and removals  added to 7.1 release note
2023-08-30 13:52:20 -04:00
Akhil G Krishnan
b52c9e04dc Rails.application.deprecators description added for rails 7.1 release note
minor fix

Request changes updated

review changes updated
2023-08-30 20:00:12 +05:30
Akhil G Krishnan
5e7b1c40ea [skip ci] ActionMailbox notable changes added to 7.1 release note
[skip ci] ActionMailbox notable changes  added to 7.1 release note
2023-08-30 18:40:04 +05:30
Akhil G Krishnan
6f40b35dd5 [skip ci] ActiveRecord deprecations and removals added to 7.1 release note 2023-08-30 18:37:01 +05:30
Ilya Abramovich
ef1b07b291
Fix generated SQL in code example using .unscoped with block
Fixes generated SQL for code sample of using `.unscoped` method with block as it was invalid
2023-08-29 18:24:00 +03:00
Adrianna Chang
9d8ac620af
Merge pull request #49059 from deepakmahakale/release_notes_7_1/activerecord_normalizes
[skip ci] Add ActiveRecord::Base.normalizes to 7.1 release notes
2023-08-29 11:05:50 -04:00
Adrianna Chang
684a2a278f
Merge pull request #49074 from akhilgkrishnan/activestorage-notable-release-note
[skip ci] ActiveStorage notable changes added to 7.1 release note
2023-08-29 11:02:07 -04:00
Adrianna Chang
5ff6a97381
Merge pull request #49076 from akhilgkrishnan/actionpack-notable-release-note
[skip ci] Railties, ActionPack notable changes and deprecations added to 7.1 release note
2023-08-29 11:01:20 -04:00
Deepak Mahakale
53a44b98b6 [skip ci] Add ActiveRecord::Base.normalizes to 7.1 release notes
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
2023-08-29 20:31:14 +05:30
Akhil G Krishnan
19cb350296 [skip ci] ActiveStorage notable changes added to 7.1 release note
Request changes updated
2023-08-29 20:27:35 +05:30
Akhil G Krishnan
c0ee485db8 [skip ci] ActionPack notable changes and deprecations added to 7.1 release note
Request changes updated
2023-08-29 20:24:13 +05:30
Adrianna Chang
72b356cdf5
Merge pull request #49061 from deepakmahakale/release_notes_7_1/removals_for_actionmailer
[skip ci] Add deprecations/removals for action-mailer, active-storage and active-job
2023-08-29 10:08:53 -04:00
Akhil G Krishnan
6b507f87e3 method description added in 7.1 release note
Review changes updated
2023-08-29 12:22:03 +05:30
Deepak Mahakale
8c4e216ab0 [skip ci] Add deprecations/removals for action-mailer, active-storage and active-job to 7.1 release notes 2023-08-29 10:17:13 +05:30
Rafael Mendonça França
a2a520e733
Merge pull request #49057 from akhilgkrishnan/action_cable_release_note
[skip ci] ActionCable notable changes added to 7.1 release note
2023-08-28 12:55:30 -04:00
Rafael Mendonça França
0b1f33e684
Merge pull request #49035 from akhilgkrishnan/action_mailer_release_note
[skip ci] Added ActionMailer notable features and deprecations to 7.1 release note
2023-08-28 12:53:10 -04:00
Rafael Mendonça França
fcda3a8857
Merge pull request #49034 from akhilgkrishnan/perform_all_later_to_relase_note_7_1
[skip ci] Add description for perform_all_later method in 7.1 release note
2023-08-28 12:47:49 -04:00
Akhil G Krishnan
3228f6421f [skip ci] ActionCable notable changes added to 7.1 release note 2023-08-28 12:24:35 +05:30
Dave Aronson
f6b987d521
Replace repeated list literals in Getting Started guide w/ a constant (#49007)
* Replace list literals w/ Visible::VALID_STATUSES

In Getting Started guide, in the article and comment status dropdowns, use Visible::VALID_STATUSES instead of repeating the list of valid statuses.  This makes the code DRYer and more expressive.  This PR also adds a comment to that effect.

* Remove text changes, leave just code

Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
2023-08-25 17:14:08 -04:00
Akhil G Krishnan
c95796489a Added ActionMailer notable features and deprecations to 7.1 release note
Unwanted changes
2023-08-25 17:56:09 +05:30
Akhil G Krishnan
26931def8c Add description for perform_all_later method in 7.1 release note 2023-08-25 16:43:00 +05:30
Dave Aronson
4ac237de74
select existing article status if any, in Getting Started Guide -- Fixes #45028 (mostly) (#49010)
* select existing article status if any

In the Getting Started guide, in the dropdown for an article or comment's status, pre-selecting `public` will make _all_ articles seem `public` even if their status is really something else -- even `nil`.  This was reported in issue #45028.  Selecting `article.status || 'public'` instead will fix this, in _most_ cases.  Pre-existing articles with `nil` status will show up as `public`, but if the form is submitted, they will indeed become `public`.

This commit makes that change, and adds text to explain why it is done.

* Simplify wording of changes to Getting Started

Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
2023-08-24 17:31:46 -04:00
Rafael Mendonça França
90bdbe0645
Merge pull request #49026 from akhilgkrishnan/release_note_docker
Add default docker files description to 7.1 release note [skip ci]
2023-08-24 14:54:10 -04:00
Akhil G Krishnan
3146a1c360 Add default docker files description to 7.1 release note
Added the review changes

review changes updated
2023-08-24 21:46:44 +05:30
Rafael Mendonça França
1c3aed0442
Merge pull request #49022 from akhilgkrishnan/release_7_1_railties
[skip ci] Added changes of railties to release notes for 7.1
2023-08-24 12:12:44 -04:00
Akhil G Krishnan
25e0fabe53 Added changes of railties to release notes for 7.1
review changes updated
2023-08-24 21:33:46 +05:30
Rafael Mendonça França
57b79cf162
Improve guide for Customizing form builder
Make the example complete so people can follow along insted of having
to understand the implicit context that you need an existing helper
called `text_field_with_label` to make the example work.

Fixes #49027.
2023-08-24 15:32:01 +00:00
Akhil G Krishnan
0f7f9e3d5e [skip ci] Moved sh to bash and added missing $ 2023-08-24 18:48:20 +05:30
Sean Doyle
90c901137f Document response.parsed_body in 7.1 release notes
Add notes for [#47144][] to the 7.1 Release Notes.

Additionally, in the time since that was merged, both Nokogiri and
Minitest have merged the PRs mentioned to integrate support for Ruby's
Pattern matching (https://github.com/sparklemotion/nokogiri/pull/2523
and https://github.com/minitest/minitest/pull/936, respectively).

This commit adds coverage for those new assertions, and incorporates
guidance into the release notes.

[#47144]: https://github.com/rails/rails/pull/47144
2023-08-23 15:33:52 -04:00