Moved the queries from the ActionMailed to the rake task to avoid unneeded multiple queries
Gem Update