Careful, you've placed this method definition completely outside of the controller class, so you've actually created a "global" method that could be accessed from anywhere in the app.