Work with rails 4