Permalink
Browse files

name clash

  • Loading branch information...
1 parent 5240081 commit f2db842812e412290e91ea572e66e5b4976cb9fd @jperrine committed Mar 30, 2012
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/jimmyapi/controllers/images.clj
  2. +4 −4 src/jimmyapi/views/images.clj
@@ -8,8 +8,8 @@
(defn index []
(view/index (model/all)))
-(defn new []
- (view/new))
+(defn new-image []
+ (view/new-image))
(defn create [params]
(let [image (:image params)]
@@ -24,8 +24,8 @@
(view/show (model/random)))
(defroutes routes
- (GET "/" [] (random))
+ (GET "/" [] (random))
(GET "/images" [] (index))
- (GET "/images/new" [] (new))
+ (GET "/images/new" [] (new-image))
(POST "/images" {params :params} (create params))
(GET "/images/:id" [id] (show id)))
@@ -7,12 +7,12 @@
(defn image-form []
[:div {:id "image-form" :class ""}
(form-to [:post "/images"]
- (label "url" "Url")
- (text-field "url")
+ (label "image[url]" "Url")
+ (text-field "image[url]")
(submit-button "Save"))])
(defn display-image [image]
- [:a {:href "/random"} [:img {:src (image :url)}]])
+ [:a {:href "/"} [:img {:src (image :url)}]])
(defn display-images [images]
[:div {:id "images"}
@@ -27,5 +27,5 @@
(layout/layout "Jimmy API"
(display-image image)))
-(defn new []
+(defn new-image []
(layout/layout "Jimmy API" (image-form)))

0 comments on commit f2db842

Please sign in to comment.