rails/rails — pull request #13786 by terracatta (2014-01-21 23:44:01+00:00)
Title: Ensure AR #second, #third, etc. finders work through associations

This PR addresses two regressions introduced in cafe31a078 (documented in #13783.) where newly created finder methods #second, #third, #forth, and #fifth caused a NoMethodError error on reload associations and where we were pulling the wrong element out of cached associations.

Examples:

```ruby

some_book.authors.reload.second

# Before
# => NoMethodError: undefined method 'first' for nil:NilClass

# After
# => #

some_book.first.authors.first
some_book.first.authors.second

# Before
# => #
# => #

# After
# => #
# => #]

```