Permalink
Browse files

Static index.html ftw

  • Loading branch information...
1 parent 9c0003f commit 6f2192b1d68c1c70d03b2c9f987eb1031266c03f @tarcieri committed Sep 13, 2011
Showing with 2 additions and 4 deletions.
  1. +1 −3 app/actions/home_action.rb
  2. +1 −1 app/views/index.erb → public/index.html
@@ -1,8 +1,6 @@
class HomeAction < Cramp::Action
- @@template = ERB.new File.read(Variety::Application.root('app/views/index.erb'))
-
def start
- render @@template.result(binding)
+ render File.read(Variety::Application.root('public/index.html'))
finish
end
end
@@ -30,7 +30,7 @@
var host = window.location.host.split(':')[0];
var SocketKlass = "MozWebSocket" in window ? MozWebSocket : WebSocket;
- var ws = new SocketKlass('ws://<%= request.host_with_port %>/websocket');
+ var ws = new SocketKlass('ws://' + window.location.host + '/websocket');
var container = $('div#msgs');
ws.onmessage = function(evt) {

0 comments on commit 6f2192b

Please sign in to comment.