Skip to content
Browse files

Rename validation/validate-by-model back to validation/validate.

  • Loading branch information...
1 parent 4c7a9d0 commit 2b8e3197e37b9904fe343f2c1675646bed2cd63c @duelinmarkers committed May 30, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/clj_record/core.clj
  2. +1 −1 src/clj_record/validation.clj
View
2 src/clj_record/core.clj
@@ -224,7 +224,7 @@ instance."
(defn ~'destroy-records [attributes#]
(destroy-records ~model-name attributes#))
(defn ~'validate [record#]
- (~'clj-record.validation/validate-by-model ~model-name record#))
+ (~'clj-record.validation/validate ~model-name record#))
(defn ~'after-destroy [attributes#]
(after-destroy ~model-name attributes#))
(defn ~'after-insert [attributes#]
View
2 src/clj_record/validation.clj
@@ -17,7 +17,7 @@
errors
{attr [message]})))
-(defn validate-by-model [model-name record]
+(defn validate [model-name record]
(callbacks/before-validation model-name record)
(let [errors (reduce #(collect-errors record %1 %2) {} (validations-for model-name))]
(callbacks/after-validation model-name record)

0 comments on commit 2b8e319

Please sign in to comment.
Something went wrong with that request. Please try again.