♊️ GemiNews 🗞️
(dev)
🏡
📰 Articles
🏷️ Tags
🧠 Queries
📈 Graphs
☁️ Stats
💁🏻 Assistant
💬
🎙️
Demo 1: Embeddings + Recommendation
Demo 2: Bella RAGa
Demo 3: NewRetriever
Demo 4: Assistant function calling
Editing article
Title
Summary
Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase.
Content
<p>Hi, it’s <a href="https://greg.molnar.io">Greg</a>. Let’s explore this week’s changes in the Rails codebase.</p> <p><a href="https://github.com/rails/rails/issues/51262">Feedback for structuring the Active Record Query Guide</a> <br /> The Active Record Querying Guide is getting restructured and the team working on it requests feedback from the community.</p> <p><a href="https://sessionize.com/rails-world">Rails World CFP closes in 2 weeks</a> <br /> 2 more weeks left to submit your talk to Rails World 2024!</p> <p><a href="https://github.com/rails/rails/pull/51267">Railties: configure sanitizer vendor in 7.1 defaults more robustly</a><br /> In apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up being <code class="language-plaintext highlighter-rouge">Rails::HTML4::Sanitizer</code> when it should be set to <code class="language-plaintext highlighter-rouge">Rails::HTML5::Sanitizer</code>. This change <code class="language-plaintext highlighter-rouge">require</code>s rails-html-sanitizer immediately before it’s needed, and avoids the possibly-incorrect assumption that <code class="language-plaintext highlighter-rouge">Rails::HTML::Sanitizer</code> is already defined.</p> <p><a href="https://github.com/rails/rails/p_posts/2024-03-08-this-week-in-rails.markdownull/51235">Illustrator .ai files are previewable as PDFs</a> <br /> 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 <code class="language-plaintext highlighter-rouge">application/pdf</code> despite having a declared content type of <code class="language-plaintext highlighter-rouge">application/illustrator</code> and an <code class="language-plaintext highlighter-rouge">.ai</code> file extension. Marcel 1.0.3 corrected this to the more specific <code class="language-plaintext highlighter-rouge">application/illustrator</code> subtype of <code class="language-plaintext highlighter-rouge">application/pdf</code>, but the MuPDF previewer only accepts the parent <code class="language-plaintext highlighter-rouge">application/pdf</code> 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 <a href="https://github.com/rails/rails/pull/51236">illustrator files previewable with Poppler as well</a></p> <p><a href="https://github.com/rails/rails/pull/51230">Deprecate <em>ActiveRecord::Base.connection</em> and <em>ConnectionPool#connection</em></a> <br /> This pull request deprecates <code class="language-plaintext highlighter-rouge">ActiveRecord::Base.connection</code> and <code class="language-plaintext highlighter-rouge">ActiveRecord::ConnectionAdapters::ConnectionPool#connection</code> in favor of <code class="language-plaintext highlighter-rouge">.lease_connection</code>. The method has been renamed as <code class="language-plaintext highlighter-rouge">lease_connection</code> to better reflect that the returned connection will be held for the duration of the request or job. <code class="language-plaintext highlighter-rouge">ActiveRecord::Base.connection</code>’s deprecation is a soft deprecation, no warnings will be issued and there is no current plan to remove the method.</p> <p><a href="https://github.com/rails/rails/pull/51204">Add <em>dirties</em> option to <em>Model.uncached</em></a><br /> This pull request adds a <code class="language-plaintext highlighter-rouge">dirties</code> option to <code class="language-plaintext highlighter-rouge">ActiveRecord::Base.uncached</code> and <code class="language-plaintext highlighter-rouge">ActiveRecord::ConnectionAdapters::ConnectionPool#uncached</code>. When set to <code class="language-plaintext highlighter-rouge">true</code> (the default), writes will clear all query caches belonging to the current thread. When set to <code class="language-plaintext highlighter-rouge">false</code>, 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.</p> <p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2024-03-01%7D...main@%7B2024-03-08%7D">here</a>.</em> <em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20240301-20240308">16 contributors</a> to the Rails codebase this past week!</em></p> <p>Until next time!</p> <p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p>
Author
Link
Published date
Image url
Feed url
Guid
Hidden blurb
--- !ruby/object:Feedjira::Parser::AtomEntry author: Greg content: |- <p>Hi, it’s <a href="https://greg.molnar.io">Greg</a>. Let’s explore this week’s changes in the Rails codebase.</p> <p><a href="https://github.com/rails/rails/issues/51262">Feedback for structuring the Active Record Query Guide</a> <br /> The Active Record Querying Guide is getting restructured and the team working on it requests feedback from the community.</p> <p><a href="https://sessionize.com/rails-world">Rails World CFP closes in 2 weeks</a> <br /> 2 more weeks left to submit your talk to Rails World 2024!</p> <p><a href="https://github.com/rails/rails/pull/51267">Railties: configure sanitizer vendor in 7.1 defaults more robustly</a><br /> In apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up being <code class="language-plaintext highlighter-rouge">Rails::HTML4::Sanitizer</code> when it should be set to <code class="language-plaintext highlighter-rouge">Rails::HTML5::Sanitizer</code>. This change <code class="language-plaintext highlighter-rouge">require</code>s rails-html-sanitizer immediately before it’s needed, and avoids the possibly-incorrect assumption that <code class="language-plaintext highlighter-rouge">Rails::HTML::Sanitizer</code> is already defined.</p> <p><a href="https://github.com/rails/rails/p_posts/2024-03-08-this-week-in-rails.markdownull/51235">Illustrator .ai files are previewable as PDFs</a> <br /> 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 <code class="language-plaintext highlighter-rouge">application/pdf</code> despite having a declared content type of <code class="language-plaintext highlighter-rouge">application/illustrator</code> and an <code class="language-plaintext highlighter-rouge">.ai</code> file extension. Marcel 1.0.3 corrected this to the more specific <code class="language-plaintext highlighter-rouge">application/illustrator</code> subtype of <code class="language-plaintext highlighter-rouge">application/pdf</code>, but the MuPDF previewer only accepts the parent <code class="language-plaintext highlighter-rouge">application/pdf</code> 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 <a href="https://github.com/rails/rails/pull/51236">illustrator files previewable with Poppler as well</a></p> <p><a href="https://github.com/rails/rails/pull/51230">Deprecate <em>ActiveRecord::Base.connection</em> and <em>ConnectionPool#connection</em></a> <br /> This pull request deprecates <code class="language-plaintext highlighter-rouge">ActiveRecord::Base.connection</code> and <code class="language-plaintext highlighter-rouge">ActiveRecord::ConnectionAdapters::ConnectionPool#connection</code> in favor of <code class="language-plaintext highlighter-rouge">.lease_connection</code>. The method has been renamed as <code class="language-plaintext highlighter-rouge">lease_connection</code> to better reflect that the returned connection will be held for the duration of the request or job. <code class="language-plaintext highlighter-rouge">ActiveRecord::Base.connection</code>’s deprecation is a soft deprecation, no warnings will be issued and there is no current plan to remove the method.</p> <p><a href="https://github.com/rails/rails/pull/51204">Add <em>dirties</em> option to <em>Model.uncached</em></a><br /> This pull request adds a <code class="language-plaintext highlighter-rouge">dirties</code> option to <code class="language-plaintext highlighter-rouge">ActiveRecord::Base.uncached</code> and <code class="language-plaintext highlighter-rouge">ActiveRecord::ConnectionAdapters::ConnectionPool#uncached</code>. When set to <code class="language-plaintext highlighter-rouge">true</code> (the default), writes will clear all query caches belonging to the current thread. When set to <code class="language-plaintext highlighter-rouge">false</code>, 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.</p> <p><em>You can view the whole list of changes <a href="https://github.com/rails/rails/compare/@%7B2024-03-01%7D...main@%7B2024-03-08%7D">here</a>.</em> <em>We had <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20240301-20240308">16 contributors</a> to the Rails codebase this past week!</em></p> <p>Until next time!</p> <p><em><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</em></p> title_type: html title: Illustrator file preview, deprecations and more! links: - https://rubyonrails.org/2024/3/8/this-week-in-rails published: 2024-03-08 00:00:00.000000000 Z entry_id: https://rubyonrails.org/2024/3/8/this-week-in-rails summary: Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase. categories: - news carlessian_info: news_filer_version: 2 newspaper: Ruby on Rails macro_region: Technology rss_fields: - author - content - title_type - title - links - published - entry_id - summary - categories - url - updated - raw_title url: https://rubyonrails.org/2024/3/8/this-week-in-rails updated: 2024-03-08 00:00:00.000000000 Z raw_title: Illustrator file preview, deprecations and more!
Language
Active
Ricc internal notes
Imported via /Users/ricc/git/gemini-news-crawler/webapp/db/seeds.d/import-feedjira.rb on 2024-04-01 22:13:48 +0200. Content is EMPTY here. Entried: author,content,title_type,title,links,published,entry_id,summary,categories,url,updated,raw_title. TODO add Newspaper: filename = /Users/ricc/git/gemini-news-crawler/webapp/db/seeds.d/../../../crawler/out/feedjira/Technology/Ruby on Rails/2024-03-08-Illustrator_file_preview,_deprecations_and_more!-v2.yaml
Ricc source
Show this article
Back to articles