diff options
| author | Alban Peignier | 2018-01-11 12:02:25 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2018-01-11 12:30:43 +0100 | 
| commit | 4f74779e9732c5dd45bd8c3cd1ae67f74d1faa28 (patch) | |
| tree | 45b0d0aba91a04acc759422ffb5d6072ca068d07 /app/models/referential.rb | |
| parent | a9cd4e4c90f90ca68292febbd88d5cdf4c7c109f (diff) | |
| download | chouette-core-4f74779e9732c5dd45bd8c3cd1ae67f74d1faa28.tar.bz2 | |
Create Referential#full_name and try to use it (to be completed). Refs #5546
Diffstat (limited to 'app/models/referential.rb')
| -rw-r--r-- | app/models/referential.rb | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/app/models/referential.rb b/app/models/referential.rb index 2b7866d9f..718f60ffd 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -105,6 +105,14 @@ class Referential < ActiveRecord::Base      self.class.human_attribute_name(*args)    end +  def full_name +    if in_referential_suite? +      name +    else +      "#{self.class.model_name.human.capitalize} #{name}" +    end +  end +    def stop_areas      Chouette::StopArea.all    end | 
