lib/ckeditor/backend/refile.rb in ckeditor-4.1.6 vs lib/ckeditor/backend/refile.rb in ckeditor-4.2.0

- old
+ new

@@ -22,16 +22,18 @@ def url(*attrs) ::Refile.attachment_url(self, :data, *attrs) end - def read_dimensions + def magick + @magick ||= MiniMagick::Image.open(model.to_io) + end + + def extract_dimensions if model.image? && model.has_dimensions? - magick = MiniMagick::Image.open(model.to_io) model.width = magick.width model.height = magick.height end end - end end end