Fix Rails 4.2 conditional