cloudhead/cradle — Issue #150: Passing parameters to views
Author: mabounassif
Created: 2012-02-25 07:55:36+00:00
State: open

Is there a way we could pass in value to a validation function other than a key?

In the database I have a list of places with coordinates, and I want to get all the places within a distance from a point. So my validation function should be able to access a radius value and a pair of coordinates, and inside the function I would calculate the distance of each place to the pair of coordinates and compare it to radius.

How can I do that with cradle or couchdb? Any help will do.