Design+messaging
I believe that this ruby code gets the user ids from the sessions updated in the last 15 minutes
Session.find (:all, :conditions=>["updated_at > ?", 15.minutes.ago]).each do |session|
user_id = session.data[:user]
end
database schema:
some docs for the javascript thing we might use for the pings:
[ http://prototypejs.org/api /timedObserver][http://prototypejs.org/api/timedObserver]
Session.find (:all, :conditions=>["updated_at > ?", 15.minutes.ago]).each do |session|
user_id = session.data[:user]
end
database schema:
- messages
- to_id, to_type (user or guest)
- from_id, from_type (user or guest)
- message
- created_at
- to_id, to_type (user or guest)
- guests
- ip_address
- name
- friends
- friend1_id (user)
- friend2_id (user)
- friend1_id (user)
some docs for the javascript thing we might use for the pings:
[ http://prototypejs.org/api /timedObserver][http://prototypejs.org/api/timedObserver]