소스 검색

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