-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
layout: post | ||
title: "Added fixture method and bugfixes" | ||
categories: news | ||
author: Wojtek | ||
og_image: assets/images/this-week-in-rails.png | ||
published: true | ||
date: 2024-03-01 | ||
--- | ||
|
||
|
||
Hi, [Wojtek](https://twitter.com/morgoth85) from this side. Let's explore this week's few changes in the Rails codebase. | ||
|
||
[Expose a generic "fixture" method in tests](https://github.com/rails/rails/pull/51213) | ||
To avoid conflicting methods, in example with Minitest, it is possible now to load fixtures like this: | ||
|
||
```ruby | ||
assert_equal "Ruby on Rails", web_sites(:rubyonrails).name | ||
assert_equal "Ruby on Rails", fixture(:web_sites, :rubyonrails).name | ||
``` | ||
|
||
[Introduce assert_initializer](https://github.com/rails/rails/pull/51176) | ||
Compliments the existing *initializer* generator action. | ||
|
||
[Set default_url_options values in development/test environments](https://github.com/rails/rails/pull/51191) | ||
Prior to this commit, new Rails applications would raise *ActionView::Template::Error* if a mailer included a url built with a *\*_path* helper. | ||
|
||
[Fix error message for not derived foreign key in Active Record](https://github.com/rails/rails/pull/51165) | ||
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. | ||
|
||
_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2024-02-25%7D...main@%7B2024-03-01%7D)._ | ||
_We had [13 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20240225-20240301) to the Rails codebase this past week!_ | ||
|
||
Until next time! | ||
|
||
_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._ |