diff options
| author | Xinhui | 2017-07-28 10:34:35 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-07-28 11:16:28 +0200 | 
| commit | 37113f588be1802d45599ad9d2175cd6f67b9871 (patch) | |
| tree | b38fe41c6e38a560fb6b47571fa1a87f03f55e7b /app/models | |
| parent | 94d4230dd902c86024e630334d072ffc0e753b6f (diff) | |
| download | chouette-core-37113f588be1802d45599ad9d2175cd6f67b9871.tar.bz2 | |
Fix undefined method local_id for StifCodifligneAttributesSupport & StifReflexAttributesSupport
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/chouette/access_point.rb | 7 | ||||
| -rw-r--r-- | app/models/concerns/stif_codifligne_attributes_support.rb | 2 | ||||
| -rw-r--r-- | app/models/concerns/stif_reflex_attributes_support.rb | 2 | 
3 files changed, 7 insertions, 4 deletions
| diff --git a/app/models/chouette/access_point.rb b/app/models/chouette/access_point.rb index 04ea40d33..c81867b52 100644 --- a/app/models/chouette/access_point.rb +++ b/app/models/chouette/access_point.rb @@ -24,12 +24,15 @@ class Chouette::AccessPoint < Chouette::ActiveRecord    validates_numericality_of :longitude, :less_than_or_equal_to => 180, :greater_than_or_equal_to => -180, :allow_nil => true    validates_format_of :coordinates, :with => %r{\A *-?(0?[0-9](\.[0-9]*)?|[0-8][0-9](\.[0-9]*)?|90(\.[0]*)?) *\, *-?(0?[0-9]?[0-9](\.[0-9]*)?|1[0-7][0-9](\.[0-9]*)?|180(\.[0]*)?) *\Z}, :allow_nil => true, :allow_blank => true - +  before_save :coordinates_to_lat_lng    def self.nullable_attributes      [:street_name, :country_code, :comment, :long_lat_type, :zip_code, :city_name]    end -  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? diff --git a/app/models/concerns/stif_codifligne_attributes_support.rb b/app/models/concerns/stif_codifligne_attributes_support.rb index d4370e505..0cd2cccc4 100644 --- a/app/models/concerns/stif_codifligne_attributes_support.rb +++ b/app/models/concerns/stif_codifligne_attributes_support.rb @@ -16,6 +16,6 @@ module StifCodifligneAttributesSupport    end    def objectid -    Chouette::StifCodifligneObjectid.new read_attribute(:objectid).to_s +    Chouette::StifCodifligneObjectid.new read_attribute(:objectid)    end  end diff --git a/app/models/concerns/stif_reflex_attributes_support.rb b/app/models/concerns/stif_reflex_attributes_support.rb index e6236a146..9dfd21f94 100644 --- a/app/models/concerns/stif_reflex_attributes_support.rb +++ b/app/models/concerns/stif_reflex_attributes_support.rb @@ -16,6 +16,6 @@ module StifReflexAttributesSupport    end    def objectid -    Chouette::StifReflexObjectid.new read_attribute(:objectid).to_s +    Chouette::StifReflexObjectid.new read_attribute(:objectid)    end  end | 
