Few things with this method:

1. Rails actually implements `find_by_whatever` on your AR models. So `Message.find_by_user_id(current_user.id)` should just work.
2. Why set user_id to an instance variably?
2. A method like this should go in a model.