put debug back into websocket
This commit is contained in:
parent
56e940131f
commit
aa7a2da3d1
3 changed files with 3 additions and 4 deletions
|
|
@ -4,8 +4,7 @@
|
||||||
%b shared a link
|
%b shared a link
|
||||||
%br
|
%br
|
||||||
= post.title
|
= post.title
|
||||||
/- (foo = post.link.to_s)
|
|
||||||
/- (bar = post.link)
|
|
||||||
%a{:href => "#{post.link}"}
|
%a{:href => "#{post.link}"}
|
||||||
= post.link
|
= post.link
|
||||||
%div.time= link_to "#{time_ago_in_words(post.updated_at)} ago", bookmark_path(post)
|
%div.time= link_to "#{time_ago_in_words(post.updated_at)} ago", bookmark_path(post)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
WebSocket.__swfLocation = "/javascripts/WebSocketMain.swf";
|
WebSocket.__swfLocation = "/javascripts/WebSocketMain.swf";
|
||||||
|
|
||||||
|
|
||||||
= javascript_include_tag 'socket' if user_signed_in?
|
= javascript_include_tag 'socket' if user_signed_in?
|
||||||
= csrf_meta_tag
|
= csrf_meta_tag
|
||||||
= yield(:head)
|
= yield(:head)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ module WebSocket
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080) do |ws|
|
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug => true) do |ws|
|
||||||
ws.onopen {
|
ws.onopen {
|
||||||
sid = @channel.subscribe { |msg| ws.send msg }
|
sid = @channel.subscribe { |msg| ws.send msg }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue