change port and network_id to bc.sth

This commit is contained in:
nigel007 2019-06-11 09:03:48 +08:00
parent 68a975d30a
commit 4cfd888414
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ class BlockchainsService
ports = []
bcs = Blockchain.find_by_sql("select network_id, port from blockchains where user_id=#{user.id}")
bcs.each do |bc|
network_ids << bc.network_id unless network_id == nil
ports << bc.port unless port == nil
network_ids << bc.network_id unless bc.network_id == nil
ports << bc.port unless bc.port == nil
end
Rails.logger.info(network_ids)
Rails.logger.info(ports)