Skip to content

Instantly share code, notes, and snippets.

@Talleyran
Created December 13, 2010 17:24
Show Gist options
  • Save Talleyran/739266 to your computer and use it in GitHub Desktop.
Save Talleyran/739266 to your computer and use it in GitHub Desktop.
class Branch < ActiveRecord::Base
belongs_to :company
belongs_to :point_shape
belongs_to :poly_shape
#has_one :style, :through => :point_shape
define_index do
indexes company.name, :as => :company
indexes poly_shape.houses.name, :as => :house
indexes poly_shape.houses.street.name, :as => :street
indexes tag
indexes another_name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment