Ruby on Rails rewrite of longbox