Files
metasploit-gs/data/msfweb/app/controllers/application.rb
T
HD Moore c8fb238302 Normalized the model methods, added search completion, etc
git-svn-id: file:///home/svn/framework3/trunk@3980 4d416f70-5f16-0410-b530-b9f4589650da
2006-09-27 05:18:06 +00:00

24 lines
512 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 = []
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