fixing orders for rails 4