@publications = if tag_name = params[:id] Document.find_tagged_with(tag_name) else Document.find_all_by_employee_id(session[:user_id]) end
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? thanks, john