Saturday, January 23, 2016

This Week In Rails: Doctrine, Weak ETags, Cabled Postgres and more!

Posted by kaspth

Hey passengers!

Have your luggage ready and get those ticket stubs out, a new issue is just about to roll in to the station. Godfrey and Kasper are co-conducting this beast of steel — eh, newsletter with Rails news, we mean.

Hop aboard before we roll off, and start choo-chooing toward…

Hey, does that sign say “Tracks End Here”?

Fresh off the tracks, a new Rails site!

Ahead of the coming major release of Rails, we got a new website and logo and… doctrine?

Yes! See, Rails has been going strong for over 10 years, the Rails Doctrine just captures that magic and spells it out. Thus Rails is ready to roll on for the next decade. The blog post dishes on the new design’s backstory.

P.S. The Rails core team got some awesome new pictures too!

This weeks Rails Contributors

This week 41 people contributed managed to rivet themselves away from the shiny new pixels above and buckle down some contributions. Kudos to you folks 😁

New Stuff

Action Cable: Postgres pubsub can sub for Redis

Action Cable uses Redis to handle publishing and subscribing, but this week Postgres became a proper pubsub’er and is swappable with Redis.

SQL expressions as a column’s default value

With this pull request, you will be able to use a SQL expression (such as a SQL function) as the default value for any column type!

Fixed

Weaker ETags makes HTTP caches stronger

HTTP ETags help cut bandwidth by sending along a tag that the server could use to validate the cached content.

Rails supports it out-of-the-box but issues “strong” ETags, which has stronger cachability implications than Rails can guarantee.

Not anymore! In Rails 5, Rails now correctly issue “weak” ETags — matching Rack::ETag’s behavior.

Improved

Removed Action Cable’s celluloid dependency

Action Cable’s dependency on the celluloid gem has been removed by using the thread pool from concurrent-ruby (which Rails already uses). While temporarily reverted it was reintroduced this week.

Better configuration documentation for Action Cable

Now rejiggered: the Action Cable documentation on how to configure the library has been clarified and better highlights how useful some methods are.

Wrapping Up

That’s all for This week in Rails. As always, there are plenty of things we’re not able to cover here, so take a peek at the changes yourself.

Until next time!