开发者

act_as_fuzzy_search plugin install

I want to install the plugin for fuzzy search. I searched a lot and came across:

https://github.com/iulianu/rails-fuzzy-search

In my model I have:

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

But I am getting the following error:

uninitialized constant User::FuzzySearch

Does anyone know how to fix this?


See the README on that github page:

Installation

NOTE! The following plugin is a prerequisite: script/plugin install git://github.com/blythedunham/eload-select.git More details at http://www.snowgiraffe.com/tech/329/eager-loading-select-plugin-when-select-plays-nice-with-include/

Have you installed the prerequisite plugin?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜