Snippets

Deepak Kumar Update intiator bank for missing records

Created by Deepak Kumar

File update_initiator_bank.rb Added

  • Ignore whitespace
  • Hide word diff
+TransactionLogs.where(:initiator_bank.in => [nil, '']).no_timeout.each_with_index do |txn|
+  if txn.initiator_bank.blank?
+    if (txn.transaction_uuid[-6] == "7") || (txn.transaction_uuid[-6] == "5")
+      txn.update_attribute(:initiator_bank, 'HDFC') 
+      puts "Index #{index + 1}"
+    end
+  end
+end
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.