The Rails Foundation, Stimulus Outlets API, bug fixes and lots of improvements!
source link: https://rubyonrails.org/2022/11/19/this-week-in-rails-the-rails-foundation-stimulus-outlets-api-bug-fixes-and-lots-of-improvements-33c69bff
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Saturday, November 19, 2022
The Rails Foundation, Stimulus Outlets API, bug fixes and lots of improvements!
Posted by siaw23
Boa noite! This is Emmanuel, bearer of good tidings.
Introducing: The Rails Foundation
In case you missed it, with eight founding members, Rails has started The Rails Foundation! Together, the founding members have contributed a total sum of $1,000,000 that will aid the foundation’s mission to improve the documentation, education, marketing, and events in our ecosystem. More here.
Raise on assignment to readonly attributes
Attributes that are marked as attr_readonly would previously fail silently, meaning data won’t be written to the database when you tried to assign new values—with this PR, read-only attributes will raise an ActiveRecord::ReadonlyAttributeError when an attempt is made to write to that read-only attribute.
Allow unscoping of preload and eager_load associations
This PR adds the ability to unscope preloaded and eager loaded associations, adding to the list of valid “unscoping” values like where, select among others.
Add filtering of encrypted attributes in #inspect
Previously, encrypted attributes could be added to an application’s filter_parameters which would filter the attribute values from logs. This commit adds an additional config to enable adding encrypted attributes to records’ filter_attributes, which allows them to be filtered when models are inspected (such as in the console).
Initialize encrypted attributes when using #first_or_create or #first_or_initialize
This fixes a bug where one would expect that encrypted values are initialized with the values provided but instead, the encrypted values were nil.
Stimulus gets an Outlets API
Around Hotwire, this PR received a warm welcome. I reached out to the author, Marco Roth, who whipped out a documentation that perfectly summarises the Outlet API:
The Outlets API lets you reference Stimulus Controller instances and their controller element from within another Stimulus Controller by using CSS selectors. The use of Outlets helps with cross-controller communication and coordination as an alternative to dispatching custom events on controller elements.
Ruby on Rails saw 22 generous contributors in the last 7 days.
Talk to you next week.
Subscribe to get these updates mailed to you.
Recommend
-
34
Creating Outlets for multiple Objects can be time-consuming and tedious. It is also possible for objects to share the same Outlets. In this tutorial multiple outlets will be created using the tag value of the buttons. Thi...
-
46
天猫精选 361度官方outlets店5.5日前120分钟清仓优惠。5日0-2点清仓直接5折优惠。尖货疯抢,对折好价。虽然是工厂店清仓优惠,但款式很多为19年新款...
-
18
In the run-up to the 2020 US election, a group of major media organizations will once again work together to try and clamp down on fake news. The Trusted News Initiative (TNI) is a coalition of blue-chip publishers and Microsof...
-
11
13 Creative Outlets for Designers By Steven Snell – December 14, 2020...
-
6
March 10, 2021
-
12
TechNews organizations are taking different approaches to how often employees will come back to the officePublished Sat, Jul 10 202111:48 AM EDTUpda...
-
7
Australian High Court Ruling Could See Media Outlets Held Legally Accountable for their Facebook Posts Published Sept. 12, 2021 By
-
2
The Windows Current Channel has been updated again
-
6
Plenty of fixes included in the latest preview build
-
5
Friday, December 2, 2022 Executive Director for Rails Foundation needed, Stimulus 3.2 and more Posted by morgoth85 Hi,
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK