litte Rails 4 adaptation