diff options
| author | Robert | 2018-01-09 12:24:23 +0100 | 
|---|---|---|
| committer | Robert | 2018-01-09 12:24:36 +0100 | 
| commit | 0e91d206fd8278d0c43c34777f4a585481882b70 (patch) | |
| tree | 9ef641b3455de5d6da2c22ffb702661e4e69ff8d /app/models | |
| parent | 7ea0a6079017c561aa8286198bd77b258cb2d240 (diff) | |
| download | chouette-core-0e91d206fd8278d0c43c34777f4a585481882b70.tar.bz2 | |
Refs: #5413@0.5h; Refactoring of #archived_or_finalised?
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/referential.rb | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/app/models/referential.rb b/app/models/referential.rb index 75c1889ca..73d29fee4 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -252,6 +252,10 @@ class Referential < ActiveRecord::Base    before_destroy :destroy_schema    before_destroy :destroy_jobs +  def referential_read_only? +    in_referential_suite? || archived_at +  end +    def in_referential_suite?      referential_suite_id.present?    end @@ -422,11 +426,6 @@ class Referential < ActiveRecord::Base      GeoRuby::SimpleFeatures::Geometry.from_ewkt(bounds.present? ? bounds : default_bounds ).envelope    end -  # For Delegator -  def archived_or_finalised? -    archived_at || in_referential_suite? -  end -    # Archive    def archive! | 
