Assuming that you have set up the relationships properly, so User
has_many posts then to get all the posts for the current user you can
just say current_user.posts, then if you want intat to be 1 also you
just say
current_user.posts.where( :itatt => 1 )
which will give you effectively an array of Post objects.
If you don't know what user has_many posts means then have a look at
the Rails Guide on ActiveRecord associations, though I strongly
suggest you work through some Rails tutorials such as
railstutorial.org, which is free to use online, before going any
further.