Land #4697, updates to finder syntax
Updates some Rails 3 style ActiveRecord calls to use the Rails 4 Arel syntax, in preparation for our move to Rails 4. Fixes #4697, also see MSP-12016bug/bundler_fix
commit
531743eff1
|
@ -168,7 +168,7 @@ module Msf::DBManager::Vuln
|
|||
sname = opts[:proto]
|
||||
end
|
||||
|
||||
service = host.services.find_or_create_by_port_and_proto(opts[:port].to_i, proto)
|
||||
service = host.services.where(port: opts[:port].to_i, proto: proto).first_or_create
|
||||
end
|
||||
|
||||
# Try to find an existing vulnerability with the same service & references
|
||||
|
|
|
@ -4,7 +4,7 @@ module Msf::DBManager::Workspace
|
|||
#
|
||||
def add_workspace(name)
|
||||
::ActiveRecord::Base.connection_pool.with_connection {
|
||||
::Mdm::Workspace.find_or_create_by_name(name)
|
||||
::Mdm::Workspace.where(name: name).first_or_create
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue