Moved some logic from posts controller to model