From 7c57b9fb57aeffd9cd81c146225ef57efcc3dcdb Mon Sep 17 00:00:00 2001 From: Sonny Gonzalez Date: Wed, 11 Feb 2015 12:02:34 -0600 Subject: [PATCH] Fix Master - Pro build MSP-12138 * revert to previous Rails 3 syntax. --- lib/msf/core/db_manager/host.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msf/core/db_manager/host.rb b/lib/msf/core/db_manager/host.rb index 26dae7a27a..b4ff90063f 100644 --- a/lib/msf/core/db_manager/host.rb +++ b/lib/msf/core/db_manager/host.rb @@ -166,9 +166,9 @@ module Msf::DBManager::Host end if opts[:comm] and opts[:comm].length > 0 - host = wspace.hosts.where(address: addr, comm: opts[:comm]).first_or_initialize + host = wspace.hosts.find_or_initialize_by_address_and_comm(addr, opts[:comm]) else - host = wspace.hosts.where(address: addr).first_or_initialize + host = wspace.hosts.find_or_initialize_by_address(addr) end else host = addr @@ -257,9 +257,9 @@ module Msf::DBManager::Host end if opts[:comm] and opts[:comm].length > 0 - host = wspace.hosts.where(address: addr, comm: opts[:comm]).first_or_initialize + host = wspace.hosts.find_or_initialize_by_address_and_comm(addr, opts[:comm]) else - host = wspace.hosts.where(address: addr).first_or_initialize + host = wspace.hosts.find_or_initialize_by_address(addr) end else host = addr