Reputation: 6639
I am following the directions from the gem's GitHub repo:
I added fuzzily to my gem file and ran rake db:install. Fuzzily 0.3.3 was successfully installed.
I created a app/models/fuzzily.rb file:
class Trigram < ActiveRecord::Base
include Fuzzily::Model
end
I then created a migration for it:
class AddTrigramModel < ActiveRecord::Migration
extend Fuzzily::Migration
end
And ran: rake db:migrate, which created a trigrams table with the fields: id, trigram, score, owner_id, owner_type, fuzzy_field
I then modified my app/models/organization.rb and added the following:
fuzzily_searchable :org_name
I saved all my work and started the console:
rails c
then:
Lobbyist.connection
Followed by:
Lobbyist.bulk_update_fuzzy_name
To which I am getting an error message: undefined method .bulk_update_fuzzy_name
My environment is:
Ruby 2.1.5
Rails 4.2.1
Any ideas?
Upvotes: 0
Views: 127
Reputation:
The name
part in bulk_update_fuzzy_name
is actually the name of the searchable field, so in your case it would be Lobbyist.bulk_update_fuzzy_org_name
. The same applies to other method calls in the readme.
Upvotes: 1