我想安装模糊搜索插件。我经常搜索并发现:
https://github.com/iulianu/rails-fuzzy-search
在我的模特中,我有:
class User < ActiveRecord::Base
include FuzzySearch
act_as_fuzzy_search :name, :email
property :id, Integer, :serial => true
property :name, String, :nullable => false , :format => /^[^<'&">]*$/, :length => 32
property :email,String, :nullable => false , :format => /^[^<'&">]*$/, :length => 32
.....
.....
end
但是我收到以下错误:
uninitialized constant User::FuzzySearch
有谁知道如何解决这个问题?
答案 0 :(得分:0)
请参阅该github页面上的README:
请注意!以下插件是先决条件: 脚本/插件安装git://github.com/blythedunham/eload-select.git 更多详情请见http://www.snowgiraffe.com/tech/329/eager-loading-select-plugin-when-select-plays-nice-with-include/
您是否安装了必备插件?