bteitelb-paperclip 2.3.1.9 → 2.3.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/paperclip/attachment.rb +4 -9
  2. metadata +1 -1
@@ -438,9 +438,6 @@ module Paperclip
438
438
 
439
439
  def dimensions style = default_style
440
440
  return [nil,nil] unless image?
441
- if @styles[style]
442
- return @styles[style][:geometry].match(/(\d*)x(\d*)/)[1,2].map {|s| s.to_i}
443
- end
444
441
  return @dimensions[style] unless @dimensions[style].nil?
445
442
  w, h = instance_read(:width), instance_read(:height)
446
443
  if w.nil? or h.nil?
@@ -450,12 +447,10 @@ module Paperclip
450
447
  instance_write(:height, h)
451
448
  instance.save unless instance.readonly?
452
449
  end
453
- if @styles[style].nil? or @styles[style][:geometry].nil?
454
- return [nil, nil]
455
- else
456
- @dimensions[style] = Geometry.parse(@styles[style][:geometry]).new_dimensions_for(w, h)
457
- return @dimensions[style]
458
- end
450
+ return [w, h] if style == :original
451
+ return [nil, nil] if @styles[style].nil? or @styles[style][:geometry].nil?
452
+ @dimensions[style] = Geometry.parse(@styles[style][:geometry]).new_dimensions_for(w, h)
453
+ return @dimensions[style]
459
454
  end
460
455
 
461
456
  def queue_existing_for_delete #:nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bteitelb-paperclip
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1.9
4
+ version: 2.3.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Yurek