Created
August 11, 2010 20:22
-
-
Save yrgoldteeth/519667 to your computer and use it in GitHub Desktop.
This file contains 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
class SyncPlsTellerIds | |
attr_reader :updated, :not_found | |
def initialize | |
@updated = [] | |
@not_found = [] | |
end | |
def run | |
tellers_to_update.each do |t| | |
u = User.find_by_login(t[:login]) | |
if u | |
u.update_attribute(:teller_id, t[:teller_id]) | |
updated << t[:login] | |
else | |
not_found << t[:login] | |
end | |
end | |
end | |
def tellers_to_update | |
[ | |
{:teller_id => '03527F20-C47D-48BB-9318-552052362364', :login => 'swkokotkiewicz'}, | |
{:teller_id => '932DABE3-2F10-4CAA-BBCA-364315068953', :login => 'swgamanderscheid'}, | |
{:teller_id => 'F5903E1A-8577-4699-A7E0-364109112236', :login => 'swmdgranados'}, | |
{:teller_id => '515BF89C-7ACD-47EE-B74A-863233244997', :login => 'swvnespinoza'}, | |
{:teller_id => '7230A47D-F3A2-484F-8109-907258365534', :login => 'swmatapia'}, | |
{:teller_id => 'D014DCAF-9FF5-4B57-ABBF-414050117850', :login => 'swsrguerrero'}, | |
{:teller_id => 'F59B1A22-166D-41CF-8A12-400234267135', :login => 'swvigil'}, | |
{:teller_id => 'D9FD93B5-2C9C-4D90-B108-307672342716', :login => 'swamrojas'}, | |
{:teller_id => 'B6F31FCD-EA85-4CE3-82E8-158401158050', :login => 'swlcortez'}, | |
{:teller_id => '41B7EA97-0E19-40FF-B7F2-907431559867', :login => 'swamsantoyo'}, | |
{:teller_id => '84C2B9B2-0A3F-410B-8623-688955383462', :login => 'swbproby'}, | |
{:teller_id => '810E7853-7512-4F31-B57E-117323102888', :login => 'swjmortega'}, | |
{:teller_id => 'BD90B50A-3F4C-43D8-A318-536141518955', :login => 'swbaomari'}, | |
{:teller_id => '45BC10E4-E42E-48CD-9063-398440483409', :login => 'swaatieshue'}, | |
{:teller_id => 'B80D659A-1128-4852-9A2D-113208245259', :login => 'swalarkell'}, | |
{:teller_id => '07420744-B3A4-490D-BC6F-365385591719', :login => 'sweatorres'}, | |
{:teller_id => '7D7E80D3-59B6-4334-BC70-299013828540', :login => 'swmanriquez'}, | |
{:teller_id => '0FBB0B59-5487-4D7F-A7C5-870230075162', :login => 'swcjarrechavala'}, | |
{:teller_id => '7FFDCCA0-6DB6-419B-A5A0-015384045770', :login => 'swsramos'}, | |
{:teller_id => '7506CB11-AF66-413C-98C6-576113344755', :login => 'swmngranados'}, | |
{:teller_id => 'F940F5E4-E817-4897-9666-193377902530', :login => 'swdpmontero'}, | |
{:teller_id => '0150AB54-C553-4D76-902F-854212892644', :login => 'swjnpedroza'}, | |
{:teller_id => '10E8568E-3331-4E5E-A652-423546110073', :login => 'swrgramirez'}, | |
{:teller_id => '3970EA41-4207-4CFD-A075-697145568670', :login => 'swjvigil'}, | |
{:teller_id => '653D50C6-8322-4D80-BF97-284942370072', :login => 'swsramos'}, | |
{:teller_id => 'FDB04B02-DB23-4618-A6CC-424254692431', :login => 'swdrector'}, | |
{:teller_id => '4129B6D1-95EE-4CE6-81CC-701090142898', :login => 'swmmcovarrubias'}, | |
{:teller_id => '09629004-65CF-4142-B517-886615191919', :login => 'swcigarcia'}, | |
{:teller_id => '3F99C42F-BE5F-4801-845F-631996273826', :login => 'swmmcbride'}, | |
{:teller_id => '03E4F230-B5D5-4CF0-A4CA-541409214641', :login => 'swvmolina'}, | |
{:teller_id => '02B99DFE-F222-4BFF-B51C-062310238915', :login => 'swrmolina'}, | |
{:teller_id => '7B5872E8-FBB1-430A-B38F-622782214566', :login => 'swsreyes'} | |
] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment