ActiveRecord::FinderMethods `#second_to_last` and `#third_to_last`
This is one reason why I like ActiveRecord
Today, for the very first time, I wanted to take a look at the second to last record from a database query.
So, instinctively I typed Posts.second_last
and I was not surprised when it said
...
Did you mean? second_to_last
Of course, third_to_last
exists too, and I am thankful for it.
https://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html