RS IZ testing GUID
This commit is contained in:
parent
2b5cf0d265
commit
3d76fa26ba
3 changed files with 5 additions and 11 deletions
|
|
@ -5,6 +5,7 @@ class Post
|
|||
include ROXML
|
||||
include Diaspora::Webhooks
|
||||
|
||||
xml_accessor :_id
|
||||
|
||||
key :person_id, ObjectId
|
||||
belongs_to :person, :class_name => 'Person'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ class StatusMessage < Post
|
|||
|
||||
xml_name :status_message
|
||||
xml_accessor :message
|
||||
|
||||
|
||||
key :message, String
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,9 @@ module WebSocket
|
|||
|
||||
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug =>false) do |ws|
|
||||
ws.onopen {
|
||||
puts ws.request['Cookie']
|
||||
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) }
|
||||
}
|
||||
|
|
@ -30,18 +29,12 @@ module WebSocket
|
|||
end
|
||||
|
||||
def self.view_hash(object)
|
||||
#begin
|
||||
# puts "I be working hard"
|
||||
v = WebSocket.view_for(object)
|
||||
#puts view.inspect
|
||||
#rescue
|
||||
# puts "in failzord " + view.inspect
|
||||
# raise "i suck"
|
||||
#end
|
||||
puts v
|
||||
{:class =>object.class.to_s.underscore.pluralize, :html => v}
|
||||
end
|
||||
|
||||
def self.view_for(object)
|
||||
@view.render @view.type_partial(object), :post => object
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue