Add Rails-style lambda constraints