lib/paperclip-aws.rb in paperclip-aws-1.1.2 vs lib/paperclip-aws.rb in paperclip-aws-1.1.3
- old
+ new
@@ -40,9 +40,14 @@
)
end
end
def url(style=default_style, options={})
+ if self.original_filename.nil?
+ default_url = @default_url.is_a?(Proc) ? @default_url.call(self) : @default_url
+ return interpolate(default_url, style)
+ end
+
if options[:expires].present? || options[:action].present?
options.reverse_merge!({
:expires => 60*60,
:action => :read
})
\ No newline at end of file