Skip to content
Browse files

Adding index to Contact model

  • Loading branch information...
1 parent 15dd12f commit ad7958f021f8a4f2bf8b26059a46ac9d92d6faa4 @pat pat committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/models/contact.rb
View
4 app/models/contact.rb
@@ -1,2 +1,6 @@
class Contact < ActiveRecord::Base
+ define_index do
+ indexes [first_name, last_name], :as => :name
+ indexes street_address, city, state, country, postal_code
+ end
end

0 comments on commit ad7958f

Please sign in to comment.
Something went wrong with that request. Please try again.