acts_as_taggable and user_id find_by...

@publications = if tag_name = params[:id]

if I am logged in and
if my url is .../document/index/wibble
i get all items tagged with wibble (with or without my user_id

if my url is .../docucment/
i get all items with my user_id.

i can't seem to find out how to get tag_name and user_id.
so I see documents i have tagged with wibble.

i've tried the find_by_tagged_with_and_user_id(tag_name, session[:user_id])
i get this error
undefined method `find_by_tagged_with_and_user_id' for Document:Class

i'm not sure what to try next...
any suggestions?