Preparing the controller as restful