Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ActiveRecord::Relation
- def second
- if loaded?
- @records[1]
- else
- @second ||= limit(2).to_a[1]
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement