Friday, May 20, 2016

This Week In Rails: Ruby 2.4 Integer, Action Mailer rescued and more!

Posted by kaspth

Shhh, stay quiet! Rails 5.0 lurks just around the corner and it’s a mean beast. 

Rails’ maintainers, computer scient(-ish)sts, spliced commit DNA merged long ago in hopes of creating a better web framework. The result is Jurrails Park. 

Here’s Kasper alongside self-volunteering co-editor Jeff Goldblum, saying: 

They were so preoccupied with whether or not they could, they didn’t stop to think if they should.

This Weeks Rails Contributors

Contributors! Contributors! Contributors!

62 commits and 22 people makes us a happy newsletter team ❤️

Fixnum + Bignum = Integer

The next version of Ruby, 2.4,  unifies Fixnum and Bignum into Integer. Have no fear, Rails is already ready with both forward compatibility, backward compatibility and all around compatible compatibility. Int’ no Fix’ too Big’, folks.

Action Mailer: rescue_from and more

Action Mailer can now rescue itself from exceptions with rescue_from

This lets the mailer handle errors from the delivering job when run with Active Job. 

Third, the exhaustively documented pull request changes how rescue_from handles Exception causes. Read more.


Support nested calls to #suppress

Calling suppress within another suppression on the same class was previously a let down. 

Now the method doesn’t take its name too seriously and all should be good.


Relation blocked Enumerable count

One of the first Rails 5.1 features brings the framework appropriately forward. Literally by forwarding count on a Relation to Enumerable when passed a block.

Time#all_day meet Date#all_day

Rails has long had Time#all_day to really expand the horizon of past times. Now Date gets to go all_day too.

Though personally, dating for a whole day sounds pretty extreme, but kids these days ¯\_(ツ)_/¯

Wrapping Up

That concludes our report for this week. There were plenty of other things going on, so feel free to jump in and check them out yourself!