Skip to content

Commit 2d8d061

Browse files
authored
Merge pull request #232 from rails/twir-01-03-2024
TWIR 01-03-2024
2 parents a53d8ea + f8b11c5 commit 2d8d061

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: post
3+
title: "Added fixture method and bugfixes"
4+
categories: news
5+
author: Wojtek
6+
og_image: assets/images/this-week-in-rails.png
7+
published: true
8+
date: 2024-03-01
9+
---
10+
11+
12+
Hi, [Wojtek](https://twitter.com/morgoth85) from this side. Let's explore this week's few changes in the Rails codebase.
13+
14+
[Rails security update releases](https://rubyonrails.org/2024/2/21/Rails-Versions-6-1-7-7-7-0-8-1-and-7-1-3-2-have-been-released)
15+
Rails Versions 6.1.7.7, 7.0.8.1, and 7.1.3.2 have been released last week which contain fixes for security issues.
16+
17+
[Expose a generic "fixture" method in tests](https://github.com/rails/rails/pull/51213)
18+
To avoid conflicting methods, in example with Minitest, it is possible now to load fixtures like this:
19+
20+
```ruby
21+
assert_equal "Ruby on Rails", web_sites(:rubyonrails).name
22+
assert_equal "Ruby on Rails", fixture(:web_sites, :rubyonrails).name
23+
```
24+
25+
[Introduce assert_initializer](https://github.com/rails/rails/pull/51176)
26+
Compliments the existing *initializer* generator action.
27+
28+
[Set default_url_options values in development/test environments](https://github.com/rails/rails/pull/51191)
29+
Prior to this commit, new Rails applications would raise *ActionView::Template::Error* if a mailer included a url built with a *\*_path* helper.
30+
31+
[Fix error message for not derived foreign key in Active Record](https://github.com/rails/rails/pull/51165)
32+
Using *query_constraints* method with a single non-primary-key column used to raise as expected, but with an incorrect error message. This has been fixed to raise with a more appropriate error message.
33+
34+
_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2024-02-25%7D...main@%7B2024-03-01%7D)._
35+
_We had [13 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20240225-20240301) to the Rails codebase this past week!_
36+
37+
Until next time!
38+
39+
_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._

0 commit comments

Comments
 (0)