---
title: "#354: Rails' CurrentAttributes considered harmful"
publication: "Ruby Weekly"
issue: 354
published_at: "2017-06-22"
canonical_url: "https://rubyweekly.com/issues/354"
---

#354: Rails' CurrentAttributes considered harmful

This week's Ruby and Rails news[Read this e-mail on the Web](http://rubyweekly.com/issues/354)

Ruby WeeklyIssue 354 — June 22, 2017

Launch School[Demystifying Rails: An Online Book](https://launchschool.com/books/demystifying_rails)Goes a level deeper than most Rails tutorials, looking at the how and why behind what Rails does.


Ryan Bigg[Rails' CurrentAttributes Considered Harmful?](http://ryanbigg.com/2017/06/current-considered-harmful)A [recent commit](https://github.com/rails/rails/commit/24a864437e845febe91e3646ca008e8dc7f76b56) introduces a thread-isolated attributes singleton to Rails, but how and why could global state be a bad thing? Ryan Bigg investigates.


Contactually[Adding Read Replicas in Rails with Zero Downtime](https://labs.contactually.com/adding-read-replicas-in-a-production-ruby-on-rails-system-with-zero-downtime-using-makara-be1d004654b0)Contactually’s approach uses [Makara](https://github.com/taskrabbit/makara), a DB connection proxy, to split query balancing among databases.


UpgradeRailsSponsored[Founders/CTOs: We upgrade Rails so that your team doesn't have to.](https://www.upgraderails.com/)If you're dreading a major Rails upgrade, we can help. UpgradeRails is a service from the founders of Hint.io and Honeybadger.io. Let our expert team upgrade your Rails app so that you can focus on features, not maintenance.

[![UpgradeRails\](https://copm.s3.amazonaws.com/17fc922e.png)](https://www.upgraderails.com/?utm_source=rubyweekly&utm_medium=email)


Noah Gibbs[A Story of Passion and Hash Tables](https://appfolio-engineering.squarespace.com/appfolio-engineering/2017/6/11/a-story-of-engineering-passion-and-ruby-hash-tables)The story behind the hash table performance improvement in Ruby 2.4.0, including the players, the debate, and the outcome.


Musefine[Build a Server-Rendered React App with Rails](https://engineering.musefind.com/build-your-first-server-side-rendered-react-app-with-rails-f1b43aa97723)If you want a React-based SPA but have some SEO concerns, rendering the page on the server can help.


Shopify Engineering[Upgrading Shopify to Rails 5](https://shopifyengineering.myshopify.com/blogs/engineering/upgrading-shopify-to-rails-5-0)How one of the largest Rails monoliths prepared, executed, and validated upgrading from Rails 4.2 to Rails 5 in just about a year.


Jobs

- [Ruby on Rails Developer - Remote/UK based](https://www.helical-levity.com/careers/rails-developer?utm_source=rubyweekly&utm_medium=email)We're looking for a developer to help us build a variety of exciting new products and take ownership of our Rails apps. Helical Levity
- [Senior Rails Developer (Remote)](https://www.bookingsync.com/en/jobs/2016-05-08-senior-rails-software-and-api-developer?utm_source=rubyweekly&utm_medium=email)BookingSync is a completely remote startup in the vacation rental space, committed to giving a percentage of our profits to charity. BookingSync
- [Web Application Engineer - Apple Inc. (California, USA)](https://ars2.equest.com/?response_id=6083dea6bbd0f0f02c35a57b3cfac971)Our Media Products Engineering team is looking for a software engineer to build and enhance our algorithmic quality evaluation tools. Apple Inc.

In brief

- [Rails 5.1.2 RC1 Released](http://weblog.rubyonrails.org/2017/6/20/Rails-5-1-2-rc1-has-been-released/?utm_source=rubyweekly&utm_medium=email) news 
As well as [5.0.4](http://weblog.rubyonrails.org/2017/6/19/Rails-5-0-4-has-been-released/). Official Rails Blog
- [Ruby 2.4 Deprecates TRUE, FALSE, and NIL Constants](http://blog.bigbinary.com/2017/06/19/ruby-2-4-has-depecated-constants-true-false-and-nil.html?utm_source=rubyweekly&utm_medium=email) news Big Binary
- [JRuby 9.1.12.0 Released: A Minor Bugfix JRuby 9000 Release](http://jruby.org/2017/06/15/jruby-9-1-12-0.html?utm_source=rubyweekly&utm_medium=email) news
- [Jekyll 3.5 Released](http://jekyllrb.com/news/2017/06/15/jekyll-3-5-0-released/?utm_source=rubyweekly&utm_medium=email) news
- [Everyday Rails Testing with RSpec Book Updated for 2017](https://everydayrails.com/2017/06/20/rspec-book-2017-updates.html?utm_source=rubyweekly&utm_medium=email) news 
A paid book freshly updated for RSpec 3.6 and Rails 5.1. Aaron Sumner
- [Rails 5.1 Drops Dependency on jQuery from the Default Stack](http://blog.bigbinary.com/2017/06/20/rails-5-1-has-dropped-dependency-on-jquery-from-the-default-stack.html?utm_source=rubyweekly&utm_medium=email) news Neeraj Singh
- [Precise Error Monitoring for Rails Apps Big and Small 🚀](https://www.bugsnag.com/platforms/rails/?utm_source=cooperpress&utm_medium=cpc&utm_content=trial-signup&utm_campaign=rails&utm_term=ruby-weekly-20170622) 
Know definitively which bugs to fix and which to ignore with precise error data and filters for clearing noise. BugsnagSponsored
- [Headless Capybara Feature Specs with Chrome](https://robots.thoughtbot.com/headless-feature-specs-with-chrome?utm_source=rubyweekly&utm_medium=email) tutorial 
Thanks to the latest Chrome, it’s now possible to run headless specs without Qt. Thoughtbot
- [Implementing Classification Using Logistic Regression](http://www.practicalai.io/implementing-classification-using-logistic-regression-in-ruby/?utm_source=rubyweekly&utm_medium=email) tutorial 
Using the liblinear-ruby gem to do two other types of regressions with varying accuracy. Practical Artificial Intelligence
- [A Quick Overview of Spies in RSpec](https://revs.runtime-revolution.com/are-you-spying-on-me-a-quick-overview-of-spies-in-rspec-c5bc7669b897?utm_source=rubyweekly&utm_medium=email) tutorial 
Learn the difference between doubles and spies. Runtime Revolution
- [The Template Method Pattern in Ruby](https://medium.com/@joshsaintjacque/the-template-method-pattern-558f3e16879f?utm_source=rubyweekly&utm_medium=email) tutorial Josh Saint Jacque
- [Faster Rails: Indexing Large Database Tables Without Downtime](http://semaphoreci.com/blog/2017/06/21/faster-rails-indexing-large-database-tables.html?utm_source=rubyweekly&utm_medium=email) tutorial Semaphore
- [Heroku Dynos Spinning Up Other Dynos](https://medium.com/@yoniweisbrod/dynos-spinning-other-dynos-with-heroku-522f3e5083b1?utm_source=rubyweekly&utm_medium=email) tutorial Yoni Weisbrod
- [Autoscaling for your Heroku dynos](https://www.hirefire.io?utm_source=rubyweekly&utm_medium=email) 
Automatically scale up and down to handle increased workloads and avoid wasting money on idle resources. HireFireSponsored
- [Making Rails Move Faster: A Tale of Lessons Learned](https://distillery.com/blog/making-a-rails-app-move-faster-a-tale-of-lessons-learned/?utm_source=rubyweekly&utm_medium=email) story 
How Distillery attacked their performance problems in Rails, including what did and didn’t work. Distillery
- [Implementing an Onboarding Tour with Mock Data in a Rails App](https://gist.github.com/thbar/6036b30ddbc2b00b7656987a930ea5b2?utm_source=rubyweekly&utm_medium=email) story Thibaut Barrère
- [Rendering Charts with Chartkick and Groupdate](https://gorails.com/episodes/charts-with-chartkick-and-groupdate?utm_source=rubyweekly&utm_medium=email) video GoRails
- [Linux cloud hosting starting at 1GB of RAM for $5/mo](http://welcome.linode.com/ruby-weekly/?utm_source=cooperpress&utm_medium=sponsored&utm_campaign=ruby-weekly-brief) linodeSponsored
- [Anyway Config: Load Configuration Parameters from Any Source](https://github.com/palkan/anyway_config?utm_source=rubyweekly&utm_medium=email) code Vladimir Dementyev
- [git-cop: Enforces Consistent Git Commits](https://github.com/bkuhlmann/git-cop?utm_source=rubyweekly&utm_medium=email) code 
A tool like RuboCop, but for Git best practices. Brooke Kuhlmann

Curated by [Peter Cooper](https://twitter.com/peterc) and [Glenn Goodrich](https://twitter.com/ruprict), and published by [Cooperpress](https://cooperpress.com/).
Send feedback by simply replying to this mail.
Want to sponsor an issue? See our [media kit.](https://cooperpress.com/mediakit)
Want to post a job? Email us or [use our self-serve system.](https://booking.cooperpress.com/jobs)

[Unsubscribe](*|UNSUB|*) | [Change email address](*|UPDATE_PROFILE|*) | [Read this issue on the Web](http://rubyweekly.com/issues/354)

© Cooperpress Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK
[Email policy](https://cooperpress.com/spam.html) [Privacy policy](https://cooperpress.com/privacy.html)
