c8fb238302
git-svn-id: file:///home/svn/framework3/trunk@3980 4d416f70-5f16-0410-b530-b9f4589650da
24 lines
512 B
Ruby
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
|