Files
metasploit-gs/data/msfweb/app/controllers/application.rb
T
HD Moore eac4c77c1a Bug fix
git-svn-id: file:///home/svn/framework3/trunk@3984 4d416f70-5f16-0410-b530-b9f4589650da
2006-09-27 22:09:55 +00:00

32 lines
586 B
Ruby

# Filters added to this controller will be run for all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
def search_modules(mlist, terms)
res = []
unless terms
return nil
end
mlist.each do |m|
if (m.name.downcase.index(terms.downcase))
res << m
next
end
if (m.description.downcase.index(terms.downcase))
res << m
next
end
end
p res.length
res
end
end