浏览代码

fix image controller to return image url correctly

Kylie Jo Swistak 6 年之前
父节点
当前提交
e76e172534
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      app/controllers/image_controller.rb

+ 5 - 1
app/controllers/image_controller.rb

@@ -6,6 +6,10 @@ class ImageController
       end
     end
 
-    image
+    if image
+      image.url
+    else
+      image_url[1]
+    end
   end
 end