RAILS 4 conversion