Add generate choices method to ny controller, which generates a choices hash that will be passed as a JSON object to the page