# Acceed the parent in nested function

**URL:** <https://www.ruby-forum.com/t/acceed-the-parent-in-nested-function/127286>\
**Category:** Rails\
**Created:** [January 27, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/acceed-the-parent-in-nested-function/127286 "2008-01-27T21:03:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jney](https://www.ruby-forum.com/u/jney)\
**Post date:** [January 27, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/acceed-the-parent-in-nested-function/127286/1 "2008-01-27T21:03:54Z")

</div>

hi, how can i acceed the parent in nested function. ex:  
user.reviews.count  
i want to acceed user object in count function. I tried with  
scoped\_methods but it doesn’t work in this case. is there another, a  
better way?
