diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-11 13:46:24 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-11 13:46:24 +0100 |
commit | f274393cd7e9ed81084661ccefa1a2e53c49b50a (patch) | |
tree | 97d1cd52b85aa5f28981bd22237d6a2070354a0f /app/controllers/trigger_controller.rb | |
parent | 525c216dc6c64821d0273dd4a63b9716dc52e715 (diff) |
Bugfix
Diffstat (limited to 'app/controllers/trigger_controller.rb')
-rw-r--r-- | app/controllers/trigger_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb index db379f9..a1bab65 100644 --- a/app/controllers/trigger_controller.rb +++ b/app/controllers/trigger_controller.rb @@ -91,6 +91,8 @@ class TriggerController < ApplicationController if fax_document.save Notifications.new_fax(fax_document).deliver + @last_fax_document = fax_document + begin File.delete(pdf_file) rescue => e @@ -112,8 +114,8 @@ class TriggerController < ApplicationController if errors.count == 0 # Indicate a new fax in the navigation bar. # - if fax_document.fax_accountable.class == User - user = fax_document.fax_accountable + if @last_fax_document.fax_account.fax_accountable.class == User + user = @last_fax_document.fax_account.fax_accountable PrivatePub.publish_to("/users/#{user.id}/messages/new", "$('#new_voicemail_or_fax_indicator').hide('fast').show('slow');") end |