Skip to content

Instantly share code, notes, and snippets.

@kineticac
Created February 26, 2013 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kineticac/5041093 to your computer and use it in GitHub Desktop.
Save kineticac/5041093 to your computer and use it in GitHub Desktop.
Sunspot searchable block moved to extension module using ActiveSupport::Concern
#extend this from Athlete model
module Extensions::AthleteSearch
extend ActiveSupport::Concern
included do
searchable :auto_index => true, :auto_remove => true do
# all your searchable code
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment