Files
metasploit-gs/data/msfweb/app/controllers/application.rb
T
lmh b5b87403d3 Mostly last commit before sleep time. Search method is broken.
git-svn-id: file:///home/svn/framework3/trunk@3983 4d416f70-5f16-0410-b530-b9f4589650da
2006-09-27 22:02:51 +00:00

29 lines
564 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.desc.downcase.index(terms.downcase))
res << m
next
end
end
res
end
end