Explorar el Código

fix image controller to return image url correctly

Kylie Jo Swistak hace 6 años
padre
commit
e76e172534
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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