From 3d31a37dd362c8cba03afb989f402f2610d2202c Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 30 Mar 2016 12:02:25 +1100 Subject: [PATCH] Remove unused method Enterprise::find_near --- app/models/enterprise.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index 432b53bd4d..84d0ce90b0 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -176,17 +176,6 @@ class Enterprise < ActiveRecord::Base end } - def self.find_near(suburb) - enterprises = [] - - unless suburb.nil? - addresses = Spree::Address.near([suburb.latitude, suburb.longitude], ENTERPRISE_SEARCH_RADIUS, :units => :km).joins(:enterprise).limit(10) - enterprises = addresses.collect(&:enterprise) - end - - enterprises - end - # Force a distinct count to work around relation count issue https://github.com/rails/rails/issues/5554 def self.distinct_count count(distinct: true)