From 10e7ec44124f7cc5609c8193864574b12165c7d0 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Thu, 24 Sep 2015 18:22:50 -0300 Subject: [PATCH] rails4: fix size to nil instead empty string (do not use to_s) --- lib/delayed_attachment_fu.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/delayed_attachment_fu.rb b/lib/delayed_attachment_fu.rb index 0e0ded6..0848f7c 100644 --- a/lib/delayed_attachment_fu.rb +++ b/lib/delayed_attachment_fu.rb @@ -39,14 +39,11 @@ module DelayedAttachmentFu end def public_filename(size=nil) - force = (size == :uploaded) - if force - size = nil - end + force, size = true, nil if size == :uploaded if !self.thumbnailable? || self.thumbnails_processed || force - super(size.to_s) + super size else - size ||= 'thumb' + size ||= :thumb '/images/icons-app/image-loading-%s.png' % size end end -- libgit2 0.21.2