♊️ GemiNews 🗞️

Demo 1: Embeddings + Recommendation Demo 2: Bella RAGa Demo 3: NewRetriever Demo 4: Assistant function calling

🗞️Illustrator file preview, deprecations and more!

🗿Semantically Similar Articles (by :title_embedding)

Illustrator file preview, deprecations and more!

2024-03-08 - Greg (from Ruby on Rails)

Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase.

Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase. Feedback for structuring the Active Record Query Guide The 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 2 more weeks left to submit your talk to Rails World 2024! Railties: configure sanitizer vendor in 7.1 defaults more robustly In 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 requires 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 This 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. This 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. Another pull request made illustrator files previewable with Poppler as well Deprecate ActiveRecord::Base.connection and ConnectionPool#connection This 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 This 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. This is needed by Solid Cache so that cache writes do not clear query caches. You can view the whole list of changes here. We had 16 contributors to the Rails codebase this past week! Until next time! Subscribe to get these updates mailed to you.

[Technology] 🌎 https://rubyonrails.org/2024/3/8/this-week-in-rails

🗿article.to_s

------------------------------
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.

Feedback for structuring the Active Record Query Guide 
The 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 
2 more weeks left to submit your talk to Rails World 2024!

Railties: configure sanitizer vendor in 7.1 defaults more robustly
In 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 requires 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 
This 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.
This 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.
Another pull request made illustrator files previewable with Poppler as well

Deprecate ActiveRecord::Base.connection and ConnectionPool#connection 
This 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
This 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.
This is needed by Solid Cache so that cache writes do not clear query caches.

You can view the whole list of changes here.
We had 16 contributors to the Rails codebase this past week!

Until next time!

Subscribe to get these updates mailed to you.
[/content]

Author: Greg
PublishedDate: 2024-03-08
Category: Technology
NewsPaper: Ruby on Rails
Tags: news
{"id"=>3194,
"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\n

Feedback 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.

\n\n

Rails World CFP closes in 2 weeks
\n2 more weeks left to submit your talk to Rails World 2024!

\n\n

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 requires rails-html-sanitizer immediately before it’s needed, and avoids the possibly-incorrect assumption that Rails::HTML::Sanitizer is already defined.

\n\n

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

\n\n

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.

\n\n

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.

\n\n

You can view the whole list of changes here.\nWe had 16 contributors to the Rails codebase this past week!

\n\n

Until next time!

\n\n

Subscribe 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"}
Edit this article
Back to articles