diff options
| author | Xinhui | 2017-07-26 16:15:17 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-07-27 16:35:12 +0200 | 
| commit | e6b04d1e7d95b80d22b1768247896956de6627ed (patch) | |
| tree | 9dd74393fa586f2063b1d84266d65cedb19bed9a /app/models/chouette/access_point.rb | |
| parent | 870f75c2411a8a46c15a0766713df9a3611f2eaf (diff) | |
| download | chouette-core-e6b04d1e7d95b80d22b1768247896956de6627ed.tar.bz2 | |
Edit access point to use new StifReflexAttributesSupport
Diffstat (limited to 'app/models/chouette/access_point.rb')
| -rw-r--r-- | app/models/chouette/access_point.rb | 7 | 
1 files changed, 6 insertions, 1 deletions
| 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?        "" | 
