如何从ruby中的下拉选项中搜索某些内容并显示?
class Detail < ActiveRecord::Base
validates :name, :email, :designation, presence: true
validates :email, uniqueness: true
def self.search(search)
if search
find(:all, :conditions => ['name LIKE '%?%'", search[:name])
else
find(:all)
end
end