caribou / caribou-core

Core functionality for Caribou
44 stars 3 forks source link

beam-validator doesn't like non-keywords as model names #16

Closed quile closed 11 years ago

quile commented 11 years ago

This seems to have appeared in the newest core (0.8.6?).

This code used to work:

(model/db #(model/pick "cheese" {:where {:id 2}}))

but now it explodes:

NullPointerException   caribou.model/beam-validator (model.clj:1897)

whereas this works:

(model/db #(model/pick :cheese {:where {:id 2}}))

I think it should allow strings, as we are dealing with model slugs coming in from URLs and query strings.

noisesmith commented 11 years ago

Fix pushed, along with unit test that verifies the fix of the issue as described.

quile commented 11 years ago

Sounds good.