Added block method to controller and model