summaryrefslogtreecommitdiff
path: root/app/controllers/trigger_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-12 11:23:20 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-12 11:23:20 +0100
commit3c5a0511d228fb3dc00ae860ade1b8ff032cc42f (patch)
tree9d8e4921e36e3b5f56d95e816ad913833ad4f502 /app/controllers/trigger_controller.rb
parentbe03d6d4d629e17ea070212ffbb2b706bc7f1cf2 (diff)
Refactoring
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