carrierwave-meta icon indicating copy to clipboard operation
carrierwave-meta copied to clipboard

image_size doesn't come back as array

Open bobbytables opened this issue 11 years ago • 1 comments

It stores the data as YAML (which seems like overkill anyways), and when calling image_size it doesn't return the array but the string instead.

Sweepstake.first.invite_button.image_size
  Sweepstake Load (0.4ms)  SELECT `sweepstakes`.* FROM `sweepstakes` LIMIT 1
=> "---\n- 521\n- 388\n"

Attempt to use image_size_s

Sweepstake.first.invite_button.image_size_s
  Sweepstake Load (0.4ms)  SELECT `sweepstakes`.* FROM `sweepstakes` LIMIT 1
NoMethodError: undefined method `join' for "---\n- 521\n- 388\n":String
from /Users/robertross/.rbenv/versions/1.9.3-p194-perf/lib/ruby/gems/1.9.1/gems/carrierwave-meta-0.0.4/lib/carrierwave-meta/meta.rb:40:in `image_size_s'

bobbytables avatar Feb 20 '13 19:02 bobbytables

Seemed that your image size column is not deserialized. I'll try to see.

gzigzigzeo avatar Aug 02 '13 16:08 gzigzigzeo