Last active
December 17, 2015 17:09
-
-
Save jonstorer/5643881 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ruby-progressbar' | |
module TagTestAccounts | |
REGEX = /@tfbnw\.net$/ | |
def self.members | |
Member.where(:email => REGEX) | |
end | |
def self.run! | |
progress_bar = ProgressBar.create({ | |
:title => 'Tag Test Accounts', | |
:total => members.count, | |
:format => '%t |%b[%P%%]%i| %c/%C [%E]' | |
}) | |
members.each do |member| | |
member.push(:tags, 'test_account') | |
progress_bar.increment | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment