From e6b04d1e7d95b80d22b1768247896956de6627ed Mon Sep 17 00:00:00 2001 From: Xinhui Date: Wed, 26 Jul 2017 16:15:17 +0200 Subject: Edit access point to use new StifReflexAttributesSupport --- app/models/chouette/access_point.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/models/chouette/access_point.rb') diff --git a/app/models/chouette/access_point.rb b/app/models/chouette/access_point.rb index da1f9524a..476f13c08 100644 --- a/app/models/chouette/access_point.rb +++ b/app/models/chouette/access_point.rb @@ -1,9 +1,10 @@ require 'geokit' require 'geo_ruby' -class Chouette::AccessPoint < Chouette::TridentActiveRecord +class Chouette::AccessPoint < Chouette::ActiveRecord # FIXME http://jira.codehaus.org/browse/JRUBY-6358 self.primary_key = "id" + include StifReflexAttributesSupport include Geokit::Mappable include ProjectionFields @@ -29,6 +30,10 @@ class Chouette::AccessPoint < Chouette::TridentActiveRecord before_save :coordinates_to_lat_lng + def referential + @referential ||= Referential.where(:slug => Apartment::Tenant.current).first! + end + def combine_lat_lng if self.latitude.nil? || self.longitude.nil? "" -- cgit v1.2.3