Displaying 1 result from an estimated 1 matches for "find_by_status".
2007 Nov 05
0
Authentication: is a guest a user or an "exception"?
...do not really exist, they are handled in the view
code (view code knows that there''s a difference between guests and
logged in users and checks accordingly)
Hello <%= member_logged_in? ? member.nickname : ''Guest'' %>!
<%= "You have #{member.private_messages.find_by_status(:unread)} unread
PM''s" if member_logged_in? %>
While the member function looks something like that:
def member
Member.find_by_id(session[:member_id])
end
----------------------------------------------------------
Alternative 2: the guest user exists in the database (with the...