Created
July 27, 2011 12:27
-
-
Save bjhaid/1109252 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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