---
title: "10 new things in Active Record"
publication: "Ruby Weekly"
issue: 477
published_at: "2019-11-21"
canonical_url: "https://rubyweekly.com/issues/477"
---

Plus the rest of this week's Ruby news.       

#477 — November 21, 2019 

[Read on the Web](https://rubyweekly.com/issues/477)     

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1574341056/smewefydbx0tosa0zjma.png)](https://github.com/ruby-next/ruby-next)  

[Ruby Next: A Way to Transpile Modern Ruby Code to Run on Ruby 2.5 or `mruby`?](https://github.com/ruby-next/ruby-next) — If you’ve used Babel in the JavaScript world, the concept here may be familiar to you. Ruby Next is designed to let us code using cutting edge (or even experimental) Ruby features and then transpile that code to run on Ruby 2.5 or `mruby`, say. **It's still early days**, but interesting. Here’s [a slidedeck](https://noti.st/palkan/j3i2Dr/ruby-next-make-old-rubies-quack-like-a-new-one) with more info. 

Vladimir Dementyev   

[Isolating Rails Engines with RuboCop](https://flexport.engineering/isolating-rails-engines-with-rubocop-210feaba3164) — [Engines](https://guides.rubyonrails.org/engines.html) provide a convenient way to break larger apps into a loosely coupled collection of smaller ones. Here’s how Flexport uses RuboCop to help programmatically enforce the isolation of their engines. 

Max Heinritz   [![\](https://copm.s3.amazonaws.com/03fd807c.png)](https://dashboard.redisgreen.net/rubyweekly) 

[Production-Grade Redis](https://dashboard.redisgreen.net/rubyweekly) — Better monitoring, seamless scaling, durable and portable Redis hosting supporting all the latest features. 

RedisGreen sponsor   

[10 New Things in Active Record (in Rails 6)](https://hint.io/blog/10-New-Things-in-Active-Record) — A neat roundup that covers things like `rails db:prepare`, database switching, `#annotate`, `#touch_all` and implicit ordering by a specific column (which is nicer than using a default scope). 

Jason Dinsmore   

▶[The Raw RubyConf 2019 Video Streams](https://youtu.be/oGNR63RQ6AM?t=2696) — RubyConf took place in Nashville earlier this week and while we’re waiting for the videos to be separated and shared properly, you can already see all three days of full streams on YouTube. We’ve linked here to Matz’s opening keynote, but will link to more videos individually in future issues. 

RubyConf 2019   

[Rails 6: The Missing Developer Setup Guide](https://dev.to/vvo/a-rails-6-setup-guide-for-2019-and-2020-hf5) — Going beyond the Rails Guides, Vincent sets up VS Code, Webpacker, Growl, reproducible environments, Heroku, and more. Whew. One for either beginners _or_ if you’ve simply not started a Rails app from scratch for a while. 

Vincent Voyer  

💻 Jobs  

[Software Developer - Ruby](https://www.anynines.com/career/full-stack-developer-ruby?utm_source=newsletter&utm_medium=Ruby%20Weekly&utm_campaign=full-stack-developer-ruby&utm_content=november) — Join our team and help to realize international cloud-native software projects based on Ruby on Rails. 

anynines   

[Senior Rails Engineer (Remote)](https://apply.workable.com/fleetio/j/2C468BAB4F/) — Ruby on Rails (5.2), Stimulus, Postgres & Heroku — We strive to keep our frameworks/libraries up to date. Perks: Remote team, competitive pay, meaningful company equity. 

Fleetio   

[Find a Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-rubyweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77583) — Make a profile, name your salary, and connect with hiring managers from top employers. Vettery is completely free for job seekers. 

Vettery   

[A Picture of the 'Post Your Jobs Here' Notice Board at Ruby Conf 2019](https://imgur.com/gallery/MNKBTDh) — It's hard to make out, but don't feel like you missed out if you couldn't attend RubyConf. Zoom in far enough and you may find the job of your dreams 😄  

📘 Articles & Tutorials  

[How to Update Counter Caches in Your Rails App Without Active Record Callbacks](https://evilmartians.com/chronicles/pulling-the-trigger-how-to-update-counter-caches-in-you-rails-app-without-active-record-callbacks) — A Postgres-focused approach to keeping your counter caches in sync using nothing but database triggers. 

Dmitry Tsepelev   

[Dealing with Similarity in Postgres and Rails using Trigrams](https://pganalyze.com/blog/similarity-in-postgres-and-ruby-on-rails-using-trigrams) — `pg_trgm` is a core Postgres module that provides functions for determining the similarity of strings based on _trigram matching._ 

Leigh Halliday   

[Are You Running Rails 6 in Production? Great, Follow These Steps to Stay Up to Date](https://www.fastruby.io/blog/rails/upgrades/how-to-stay-up-to-date.html?utm_source=rubyweekly&utm_medium=email&utm_campaign=sponsored-link-20191120) — FastRuby.io has upgraded hundreds of applications. Implement their tips to never fall behind again. 

FastRuby.io sponsor   

▶[Testing Times and Dates with Rails](https://gorails.com/episodes/testing-times-and-dates-with-rails) — Rails provides several helper methods for testing times and dates in your apps. Freeze time and time travel like a superhero 😂 

GoRails   

[How I Approach Test Coverage Metrics](https://www.codewithjason.com/approach-test-coverage-metrics/) — _“Test coverage is a useful metric but only in a very approximate and limited sort of way.”_ Comparing 90% coverage to 100% coverage really isn’t a great use of your time. 

Jason Swett   

[Working with Capistrano: Tasks, Roles, and Variables](https://piotrmurach.com/articles/working-with-capistrano-tasks-roles-and-variables/) 

Piotr Murach   

[Write _One_ Test](https://andycroll.com/ruby/write-one-test/) — Much, much better than none.. 

Andy Croll  

🛠 Code and Tools  

[Browser: A Browser Detection Library](https://github.com/fnando/browser) — A handy API for browser detection from within Ruby. Pass in a user agent string and query it in various ways (e.g. `browser.webkit?` or `browser.device.name`). Includes ActionController integration, as well as optional Rack middleware for agent-based redirections. 

Nando Vieira   

[A Tetris Game Powered by Ruby2D](https://github.com/Nakilon/rbtris) — A neat little example of creating a simple game in Ruby especially as it’s under 200 lines of code (all in one file). 

Victor Maslov   

[Chatwoot: Simple, Open Source Live Chat Software](https://github.com/chatwoot/chatwoot) — Bills itself as a Rails-based open source alternative to a service like Intercom. 

Chatwoot   

[JetBrains RubyMine: Cross-Platform IDE for Ruby & Rails Development](https://www.jetbrains.com/ruby/promo/?utm_source=cooperpress&utm_medium=cpc&utm_campaign=rubymine) 

JetBrains sponsor   

[Shrine 3.1: The File Attachment Toolkit for Ruby Webapps](https://github.com/shrinerb/shrine) 

Shrine   

[Ruby Trello API: An Implementation of the Trello API for Ruby](https://github.com/jeremytregunna/ruby-trello) — For users of the popular [Trello](https://trello.com/en) list-management webapp. 

Jeremy Tregunna         

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
