RS IZ testing GUID

This commit is contained in:
ilya 2010-06-28 14:28:01 -04:00
parent 2b5cf0d265
commit 3d76fa26ba
3 changed files with 5 additions and 11 deletions

View file

@ -5,6 +5,7 @@ class Post
include ROXML include ROXML
include Diaspora::Webhooks include Diaspora::Webhooks
xml_accessor :_id
key :person_id, ObjectId key :person_id, ObjectId
belongs_to :person, :class_name => 'Person' belongs_to :person, :class_name => 'Person'

View file

@ -15,10 +15,9 @@ module WebSocket
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug =>false) do |ws| EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug =>false) do |ws|
ws.onopen { ws.onopen {
puts ws.request['Cookie']
sid = @channel.subscribe { |msg| ws.send msg } sid = @channel.subscribe { |msg| ws.send msg }
ws.onmessage { |msg| puts msg}#@channel.push msg; puts msg} ws.onmessage { |msg|}#@channel.push msg; puts msg}
ws.onclose { @channel.unsubscribe(sid) } ws.onclose { @channel.unsubscribe(sid) }
} }
@ -30,14 +29,8 @@ module WebSocket
end end
def self.view_hash(object) def self.view_hash(object)
#begin
# puts "I be working hard"
v = WebSocket.view_for(object) v = WebSocket.view_for(object)
#puts view.inspect puts v
#rescue
# puts "in failzord " + view.inspect
# raise "i suck"
#end
{:class =>object.class.to_s.underscore.pluralize, :html => v} {:class =>object.class.to_s.underscore.pluralize, :html => v}
end end