# Acts\_as\_attachment, what to check b4 db call?

**URL:** <https://www.ruby-forum.com/t/acts-as-attachment-what-to-check-b4-db-call/92816>\
**Category:** Rails\
**Created:** [April 24, 2007, 3:12pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-what-to-check-b4-db-call/92816 "2007-04-24T15:12:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mixplate](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Post date:** [April 24, 2007, 3:12pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-what-to-check-b4-db-call/92816/1 "2007-04-24T15:12:09Z")

</div>

question,

using aaa and fetching all records that belong to a user, is

current\_user.login what is use?

for example if user has\_many notes, notes belong\_to user…

@usernotes = Note.find(:all, :conditions =\> [“user\_id = ?”,  
current\_user.id  
])
