Monday, May 6, 2024
HomeRuby On RailsRuby on Rails — ERB in YAML keys, efficiency boosts, a brand...

Ruby on Rails — ERB in YAML keys, efficiency boosts, a brand new choice for QueryLogs!


Friday, September 30, 2022

ERB in YAML keys, efficiency boosts, a brand new choice for QueryLogs!

Posted by chancancode

こんにちは。I’m Emmanuel, and I’ve acquired some updates for you!

Keep away from double kind forged when serialising attributes
ActiveModel::Attribute#worth already casts mannequin attributes when persisting fashions, nonetheless some mannequin attribute varieties attempt to forged a given worth earlier than serialising it. This this implies casting is completed twice normally. This PR fixes that, giving us some efficiency increase.

Add capacity to set the tags_format for QueryLogs
ActiveRecord::QueryLogs will get a brand new tags_format choice. This makes it attainable to specify if we need to use the default :legacy formatter or :sqlcommenter.

Facilitate use of any common ERB in database.yml
DummyCompiler has been changed with ERB::Compiler. True to what dummy compilers do, it’d blow up when one tried to make use of ERB in a YAML key. This PR makes it attainable to make use of ERB in YAML keys. Whereas at it, we additionally deprecated config.active_record.suppress_multiple_database_warning.

Rails.error.report now marks errors as reported
Rails.error.report now marks errors as reported to keep away from reporting them twice. This PR additionally permits catching and reporting errors exterior of the execution context.

We noticed 23 contributors within the final seven days.

That’s it. Till subsequent week!

Subscribe to get these updates mailed to you.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments