diff options
| author | Michel Etienne | 2012-08-02 15:28:58 +0200 |
|---|---|---|
| committer | Michel Etienne | 2012-08-02 15:28:58 +0200 |
| commit | 7e7d452e59fb6dddce09e616a0d229930dd4dc5d (patch) | |
| tree | d6c20a527741bc8265112e55764bc3b36af7c068 /app/models | |
| parent | 84bf9638c2d18d4f636e7dc51e2ba6a2fe4a97b2 (diff) | |
| download | chouette-core-7e7d452e59fb6dddce09e616a0d229930dd4dc5d.tar.bz2 | |
redefine spec for updates
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/referential.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb index ab02930fc..88e472ca7 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -22,11 +22,13 @@ class Referential < ActiveRecord::Base has_many :exports, :dependent => :destroy def slug_excluded_values - if slug.start_with? "pg_" - errors.add(:slug,"pg_excluded") - end - if slug == 'public' - errors.add(:slug,"public_excluded") + if ! slug.nil? + if slug.start_with? "pg_" + errors.add(:slug,"pg_excluded") + end + if slug == 'public' + errors.add(:slug,"public_excluded") + end end end |
