"title"=>"Illustrator file preview, deprecations and more!",
"summary"=>"Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase.",
"content"=>"
Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase.
\n\nFeedback for structuring the Active Record Query Guide
\nThe Active Record Querying Guide is getting restructured and the team working on it requests feedback from the community.
Rails World CFP closes in 2 weeks
\n2 more weeks left to submit your talk to Rails World 2024!
Railties: configure sanitizer vendor in 7.1 defaults more robustly
\nIn apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up being Rails::HTML4::Sanitizer
when it should be set to Rails::HTML5::Sanitizer
. This change require
s rails-html-sanitizer immediately before it’s needed, and avoids the possibly-incorrect assumption that Rails::HTML::Sanitizer
is already defined.
Illustrator .ai files are previewable as PDFs
\nThis happened to work with Marcel 1.0.2 and earlier since magic byte sniffing sees that Illustrator files are PDFs internally, causing these files to be treated as application/pdf
despite having a declared content type of application/illustrator
and an .ai
file extension. Marcel 1.0.3 corrected this to the more specific application/illustrator
subtype of application/pdf
, but the MuPDF previewer only accepts the parent application/pdf
type.\nThis pull request changes it to accept PDF and any child types allows the previewer to explicitly work with Illustrator files again, which was only a happy accident previously.\nAnother pull request made illustrator files previewable with Poppler as well
Deprecate ActiveRecord::Base.connection and ConnectionPool#connection
\nThis pull request deprecates ActiveRecord::Base.connection
and ActiveRecord::ConnectionAdapters::ConnectionPool#connection
in favor of .lease_connection
. The method has been renamed as lease_connection
to better reflect that the returned connection will be held for the duration of the request or job. ActiveRecord::Base.connection
’s deprecation is a soft deprecation, no warnings will be issued and there is no current plan to remove the method.
Add dirties option to Model.uncached
\nThis pull request adds a dirties
option to ActiveRecord::Base.uncached
and ActiveRecord::ConnectionAdapters::ConnectionPool#uncached
. When set to true
(the default), writes will clear all query caches belonging to the current thread. When set to false
, writes to the affected connection pool will not clear any query cache.\nThis is needed by Solid Cache so that cache writes do not clear query caches.
You can view the whole list of changes here.\nWe had 16 contributors to the Rails codebase this past week!
\n\nUntil next time!
\n\nSubscribe to get these updates mailed to you.
","author"=>"Greg",
"link"=>"https://rubyonrails.org/2024/3/8/this-week-in-rails",
"published_date"=>Fri, 08 Mar 2024 00:00:00.000000000 UTC +00:00,
"image_url"=>nil,
"feed_url"=>"https://rubyonrails.org/2024/3/8/this-week-in-rails",
"language"=>nil,
"active"=>true,
"ricc_source"=>"feedjira::v1",
"created_at"=>Wed, 03 Apr 2024 14:31:21.395569000 UTC +00:00,
"updated_at"=>Tue, 14 May 2024 04:41:57.797906000 UTC +00:00,
"newspaper"=>"Ruby on Rails",
"macro_region"=>"Technology"}