阅读背景:

如何优化这种ruby方法?它将查询结果解析为数组。

来源:互联网 

Here's what I have:

这就是我所拥有的:

def existing_photos
  @existing_photos = Array.new
  event.photos.each do |ep|
    @existing_photos << URI.unescape(ep.dropbox_path.split('/').last) rescue []
  end
  @existing_photos
end
def existing_



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: