【发布时间】:2013-10-15 04:14:47
【问题描述】:
如何获取当前载波实例的宽度和高度?
类似这样的:
car_images.each do | image|
image_tag( image.photo_url, :width => image.photo_width, :height => image.photo_height)
end
很遗憾,image.photo_width 和 image.photo_height 无法正常工作。
我需要指定图像的宽度和高度,这是我正在使用的 jquery 插件所必需的。
【问题讨论】:
标签: ruby-on-rails ruby carrierwave rmagick