Improve scaffold generator to do pagination in scope