Module: PostgreSQLCube::Model

Extended by:
ActiveSupport::Concern
Defined in:
lib/postgresql-cube/model.rb

Instance Method Summary collapse

Instance Method Details

#similar_by_cube_distance(column_name) ⇒ Object



36
37
38
39
# File 'lib/postgresql-cube/model.rb', line 36

def similar_by_cube_distance(column_name)
  similar = self.class.by_cube_distance(column_name, send(column_name))
  similar.where.not(self.class.primary_key => send(self.class.primary_key))
end