Ruby Weekly


A pitfall of the &. operator in Ruby

Update 1: The article was translated to Japanese

Update 2: This post is featured in RubyWeekly #374

The &. operator, added to Ruby 2.3, is handy and I’ve cleaned a lot of code with it. You can use it in conjunction with default operators as described in Ruby's New &.!= Operator.

Recently I introduced a bug when using &.. First we had:

if start_date && start_date < start_of_month && end_date.nil?
  # …
end




Parallel rendering in Rails

Discussion on Reddit

I will continue to expand the features in the pagelet_rails gem. Since it offers a new way of composition in Rails I've found that there are so many new things we can do. In this post, I will focus on the parallel rendering. Yes, that's right, parallel rendering in Rails. Although, it may sound advanced the concepts behind it are extremely simple. This post however is only relevant to web page rendering.

Update 2: This post was featured in RubyWeekly #318