summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-29 10:45:11 +0100
committerJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-29 10:45:11 +0100
commit0b97717b2171820dea41de8df705f8f0e4b71464 (patch)
tree6a5c05313b58c29fd2799c65d26872d782d69921 /app
parent2cdeb604527414bb865b08a7f4529025ec0802d9 (diff)
parent24f613cac47fae29a48dab351e9ee195f5b53eed (diff)
Merge branch 'develop'
Diffstat (limited to 'app')
-rw-r--r--app/controllers/trigger_controller.rb12
-rw-r--r--app/views/users/show.html.haml6
2 files changed, 13 insertions, 5 deletions
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb
index ac43832..2b491be 100644
--- a/app/controllers/trigger_controller.rb
+++ b/app/controllers/trigger_controller.rb
@@ -97,8 +97,16 @@ class TriggerController < ApplicationController
if fax_document.save
Notifications.new_fax(fax_document).deliver
- File.delete("#{TMP_DIR}#{tiff_file}");
- File.delete(pdf_file);
+ begin
+ File.delete("#{TMP_DIR}#{tiff_file}");
+ rescue => e
+ logger.error "Raw fax file could not be deleted: #{TMP_DIR}#{tiff_file} => #{e.inspect}"
+ end
+ begin
+ File.delete(pdf_file);
+ rescue => e
+ logger.error "PDF fax file could not be deleted: #{TMP_DIR}#{pdf_file} => #{e.inspect}"
+ end
fax_document.tiff = nil
fax_document.save
fax_document.render_thumbnails
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 639a52a..c63c791 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -16,14 +16,14 @@
%tbody
%tr
%td
- %strong= t('users.show.user_name') + ":"
+ %strong= truncate(t('users.show.user_name'), :length => 7) + ":"
%td
= truncate(@user.user_name, :length => 14)
%tr
%td
- %strong= t('users.show.email') + ":"
+ %strong= truncate(t('users.show.email'), :length => 7) + ":"
%td
- = truncate(@user.email, :length => 14)
+ = mail_to @user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + truncate(@user.email, :length => 16))
%p.controls
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user }