【发布时间】:2016-08-22 08:34:07
【问题描述】:
我需要通过 url 获取一些图片。
网址类似于http://img.wallsbay.com/large/2014/05/2665.jpg,但 2014 和 2665 正在更改。
我的控制器有这个参数:
def image_params
params.require(:image).permit(:content, :remote_content_url, :id)
end
我试图从这样的 url 获取图像:
@image.remote_content_url = 'http://img.wallsbay.com/large/#{:content}/05/#{:id}jpg'
但是 remote_content_url 是未定义的方法。
【问题讨论】:
标签: ruby-on-rails ruby carrierwave image-upload