assaf/vanity — pull request #235 by zozo (2014-11-05 13:37:08+00:00)
Title: Optimize add_participant action

I'm using JS to track real users (Vanity.playground.use_js!) and skip bots. After I deleted an old experiment, I've started to receive many 500 errors from GoogleBot when it knocked to /vanity/add_participant action for deleted experiment. Also the problem was when I had more than one experiment on a single page - it generates one request for each experiment on each page loading - that is unusual overhead imho. So this PR fixes this problem. Raise 404 (instead of 500) for unknown tests and call add_participants only once for all experiments.