Skip to content

Instantly share code, notes, and snippets.

@bjhaid
Created July 27, 2011 12:27
Show Gist options
  • Save bjhaid/1109252 to your computer and use it in GitHub Desktop.
Save bjhaid/1109252 to your computer and use it in GitHub Desktop.
17 def new
18 @incoming = Incoming.create({:exten_number => params[:exten_number], :cid_number => params[:cid_number]})
19
20 if @incoming.update_attributes(params[:incoming])
21
22 faye = Faye::Client.new('http://0.0.0.0:9292/faye')
23 EM.run {
24 faye.publish("/incomings", 'text' => 'Update html view!')
25 }
26 end
27 respond_to do |format|
28 format.html # index.html.erb
29 format.xml { render :xml => @incoming }
30 end
31 end
32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment