summaryrefslogtreecommitdiff
path: root/app/controllers/trigger_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/trigger_controller.rb')
-rw-r--r--app/controllers/trigger_controller.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb
index fb53c37..e3fc524 100644
--- a/app/controllers/trigger_controller.rb
+++ b/app/controllers/trigger_controller.rb
@@ -63,6 +63,18 @@ class TriggerController < ApplicationController
end
end
+ def fax_has_been_sent
+ fax_document = FaxDocument.find(params[:id])
+
+ if fax_document
+ # push the partial to the webbrowser
+ #
+ new_html = render_to_string("fax_documents/_fax_document", :layout => false, :locals => {:fax_document => fax_document})
+ PrivatePub.publish_to("/fax_documents/#{fax_document.id}", "$('#fax_document_" + fax_document.id.to_s + "').replaceWith(escape_javascript(" + new_html + "));")
+ end
+
+ end
+
def fax
if !params[:fax_account_id].blank?
fax_account = FaxAccount.where(:id => params[:fax_account_id].to_i).first