@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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---