♊️ GemiNews 🗞️
🏡
📰 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
Hope you’re having a lovely weekend. Emmanuel here with yet another batch of Rails updates for you!
Content
<p>Hope you’re having a lovely weekend. <a href="https://twitter.com/siaw23">Emmanuel</a> here with yet another batch of Rails updates for you!</p> <p><a href="https://github.com/rails/rails/pull/47025">assert_broadcasts returns the messages that were broadcast </a><br /> <em>assert_broadcasts</em> now not only confirms the broadcast but also provides access to the messages that were broadcast. This enhancement, similar to what we have in <em>assert_emails</em>, facilitates additional analyses of the transmitted messages.<br /> Here’s an example:</p> <div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">test_emails_more_thoroughly</span> <span class="n">email</span> <span class="o">=</span> <span class="n">assert_emails</span> <span class="mi">1</span> <span class="k">do</span> <span class="no">ContactMailer</span><span class="p">.</span><span class="nf">welcome</span><span class="p">.</span><span class="nf">deliver_now</span> <span class="k">end</span> <span class="n">assert_email</span> <span class="s1">'Hi there'</span><span class="p">,</span> <span class="n">email</span><span class="p">.</span><span class="nf">subject</span> <span class="n">emails</span> <span class="o">=</span> <span class="n">assert_emails</span> <span class="mi">2</span> <span class="k">do</span> <span class="no">ContactMailer</span><span class="p">.</span><span class="nf">welcome</span><span class="p">.</span><span class="nf">deliver_now</span> <span class="no">ContactMailer</span><span class="p">.</span><span class="nf">welcome</span><span class="p">.</span><span class="nf">deliver_later</span> <span class="k">end</span> <span class="n">assert_email</span> <span class="s1">'Hi there'</span><span class="p">,</span> <span class="n">emails</span><span class="p">.</span><span class="nf">first</span><span class="p">.</span><span class="nf">subject</span> <span class="k">end</span> </code></pre></div></div> <p><a href="https://github.com/rails/rails/pull/50901">Autosaving has_one sets foreign key attribute when unchanged</a><br /> This pull request corrected an issue where the <em>has_one</em> association would erroneously set the foreign key attribute even when unchanged. This behavior was inconsistent with the autosaving mechanism of <em>belongs_to</em> associations and could lead to unintended side effects, such as triggering an <em>ActiveRecord::ReadOnlyAttributeError</em> when the foreign key attribute is set as read-only.</p> <p><a href="https://github.com/rails/rails/pull/51078">Fix override existing join types in the query in the where.associated method</a><br /> The fix now ensures that the association is joined using the correct join type (either INNER JOIN or LEFT OUTER JOIN) based on the existing joins in the scope. This prevents inadvertent overrides of existing join types and guarantees consistency in the resulting SQL queries.</p> <p><a href="https://github.com/rails/rails/pull/51131">Add parameter filter capability for redirect locations</a><br /> Here we add a parameter filter capability for redirect locations. This feature utilizes the <em>config.filter_parameters</em> to determine which parameters should be filtered. As a result, redirects will not display filtered parameters, ensuring sensitive information remains protected. A redirect location with filtered parameters will now look like: <em>Redirected to secret.foo.bar?username=roque&password=[FILTERED]</em>.</p> <p><a href="https://github.com/rails/rails/pull/51125">Support filenames in Logger.logger_outputs_to?</a><br /> Well, this one is straightforward, we can now do stuff like <em>Logger.logger_outputs_to?(‘/var/log/rails.log’)</em>.</p> <p>That’s it! We saw <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20240216-20240224">43 people contribute</a> to Rails this past week!</p> <p>Take care :)</p> <p>Your weekly inside scoop of interesting commits, pull requests and more from <a href="https://github.com/rails/rails"><strong>Rails</strong></a>.</p> <p><i><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</i></p>
Author
Link
Published date
Image url
Feed url
Guid
Hidden blurb
--- !ruby/object:Feedjira::Parser::AtomEntry author: Emmanuel Hayford content: |- <p>Hope you’re having a lovely weekend. <a href="https://twitter.com/siaw23">Emmanuel</a> here with yet another batch of Rails updates for you!</p> <p><a href="https://github.com/rails/rails/pull/47025">assert_broadcasts returns the messages that were broadcast </a><br /> <em>assert_broadcasts</em> now not only confirms the broadcast but also provides access to the messages that were broadcast. This enhancement, similar to what we have in <em>assert_emails</em>, facilitates additional analyses of the transmitted messages.<br /> Here’s an example:</p> <div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">def</span> <span class="nf">test_emails_more_thoroughly</span> <span class="n">email</span> <span class="o">=</span> <span class="n">assert_emails</span> <span class="mi">1</span> <span class="k">do</span> <span class="no">ContactMailer</span><span class="p">.</span><span class="nf">welcome</span><span class="p">.</span><span class="nf">deliver_now</span> <span class="k">end</span> <span class="n">assert_email</span> <span class="s1">'Hi there'</span><span class="p">,</span> <span class="n">email</span><span class="p">.</span><span class="nf">subject</span> <span class="n">emails</span> <span class="o">=</span> <span class="n">assert_emails</span> <span class="mi">2</span> <span class="k">do</span> <span class="no">ContactMailer</span><span class="p">.</span><span class="nf">welcome</span><span class="p">.</span><span class="nf">deliver_now</span> <span class="no">ContactMailer</span><span class="p">.</span><span class="nf">welcome</span><span class="p">.</span><span class="nf">deliver_later</span> <span class="k">end</span> <span class="n">assert_email</span> <span class="s1">'Hi there'</span><span class="p">,</span> <span class="n">emails</span><span class="p">.</span><span class="nf">first</span><span class="p">.</span><span class="nf">subject</span> <span class="k">end</span> </code></pre></div></div> <p><a href="https://github.com/rails/rails/pull/50901">Autosaving has_one sets foreign key attribute when unchanged</a><br /> This pull request corrected an issue where the <em>has_one</em> association would erroneously set the foreign key attribute even when unchanged. This behavior was inconsistent with the autosaving mechanism of <em>belongs_to</em> associations and could lead to unintended side effects, such as triggering an <em>ActiveRecord::ReadOnlyAttributeError</em> when the foreign key attribute is set as read-only.</p> <p><a href="https://github.com/rails/rails/pull/51078">Fix override existing join types in the query in the where.associated method</a><br /> The fix now ensures that the association is joined using the correct join type (either INNER JOIN or LEFT OUTER JOIN) based on the existing joins in the scope. This prevents inadvertent overrides of existing join types and guarantees consistency in the resulting SQL queries.</p> <p><a href="https://github.com/rails/rails/pull/51131">Add parameter filter capability for redirect locations</a><br /> Here we add a parameter filter capability for redirect locations. This feature utilizes the <em>config.filter_parameters</em> to determine which parameters should be filtered. As a result, redirects will not display filtered parameters, ensuring sensitive information remains protected. A redirect location with filtered parameters will now look like: <em>Redirected to secret.foo.bar?username=roque&password=[FILTERED]</em>.</p> <p><a href="https://github.com/rails/rails/pull/51125">Support filenames in Logger.logger_outputs_to?</a><br /> Well, this one is straightforward, we can now do stuff like <em>Logger.logger_outputs_to?(‘/var/log/rails.log’)</em>.</p> <p>That’s it! We saw <a href="https://contributors.rubyonrails.org/contributors/in-time-window/20240216-20240224">43 people contribute</a> to Rails this past week!</p> <p>Take care :)</p> <p>Your weekly inside scoop of interesting commits, pull requests and more from <a href="https://github.com/rails/rails"><strong>Rails</strong></a>.</p> <p><i><a href="https://world.hey.com/this.week.in.rails">Subscribe</a> to get these updates mailed to you.</i></p> title_type: html title: Enhanced assert_broadcasts, file support for Logger outputs and more! links: - https://rubyonrails.org/2024/2/24/this-week-in-rails-enhanced-assert_broadcasts-file-support-for-logger-outputs-and-more-25a0f981 published: 2024-02-24 00:00:00.000000000 Z entry_id: https://rubyonrails.org/2024/2/24/this-week-in-rails-enhanced-assert_broadcasts-file-support-for-logger-outputs-and-more-25a0f981 summary: Hope you’re having a lovely weekend. Emmanuel here with yet another batch of Rails updates for you! 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/2/24/this-week-in-rails-enhanced-assert_broadcasts-file-support-for-logger-outputs-and-more-25a0f981 updated: 2024-02-24 00:00:00.000000000 Z raw_title: Enhanced assert_broadcasts, file support for Logger outputs 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-03 16:31:21 +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-02-24-Enhanced_assert_broadcasts,_file_support_for_Logger_outputs_and_-v2.yaml
Ricc source
Show this article
Back to articles