Afternoon all,
I have this query and was wondering how i could convert this into finding the last but one record so instead of .last it would get -1. ( I have read Rails: how to find record before last? but i’m not sure how to convert this query)
The code;
Model.last.hotels.find_by_winner(true)
many thanks in advance! Andy
1 Answer