Saturday, February 20, 2016

This week in Rails: RailsConf program, on_weekday? and more!

Posted by chancancode

Hello, this is Godfrey and Prathamesh bringing you the latest developments from Rails!

RailsConf 2016 program announced

The conference is looking pretty awesome, with a good mix of talks on various topics. I hope you are as excited as I am!

This week’s Rails contributors

This week, we have recorded 136 commits from 37 contributors (including 8 first-time contributors)! Thank you for making Rails better for everyone!

New Stuff

#on_weekday? method to Date, Time, and DateTime

Along with #on_weekend?, you can now easily find out if a certain day falls on a weekday (M-F). The question is, do you really want to know?


Fix incorrect behavior with unsubscribing to channels

Saying goodbye is certainly hard, but having to listen for one might just be worse. Luckily for us, all of these are abstracted deep inside Action Cable, so we will never have to go through that ourselves.


Inject Rails configurations through Railtie

Dependency injection might not be a virtue, but in this case, it certainly helps keeping things neatly isolated from each other.

Tagged errors in logs

A while ago, tagged logging became the default on production on Rails 5. Now the tags are included in the logs for errors too!

Automatically reset ActionMailer::Base.deliveries in integration tests

With this patch, Rails 5 will automatically clear the ActionMailer::Base.deliveries array in between your integration tests.

Support nested params in button_to helper

We can now pass nested hashes or arrays to button_to helpers’s params option.

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 look at the changes yourself.

Until next time!