add ruby snippet for controller