Browse Source

fix image controller to return image url correctly

Kylie Jo Swistak 6 năm trước cách đây
mục cha
commit
e76e172534
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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