diff options
| author | cedricnjanga | 2017-10-24 19:10:11 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-10-24 19:10:11 +0200 |
| commit | a8ae0d3bf9105b17bfdb6dc22f527140f8edb6dd (patch) | |
| tree | 50bb2f3af42be39b85c17d070971b218c2b495a5 /app/models/import.rb | |
| parent | 545671efd71380722dbc3272f5f513ea684891bd (diff) | |
| parent | 2568e7f7553c82adb0bed1521ef9f013df9df87e (diff) | |
| download | chouette-core-a8ae0d3bf9105b17bfdb6dc22f527140f8edb6dd.tar.bz2 | |
Merge branch 'master' into staging
Diffstat (limited to 'app/models/import.rb')
| -rw-r--r-- | app/models/import.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/import.rb b/app/models/import.rb index 64f713914..4ff8326ab 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -18,6 +18,7 @@ class Import < ActiveRecord::Base validates :file, presence: true validates_presence_of :workbench, :creator + validates_format_of :file, with: %r{\.zip\z}i, message: I18n.t('activerecord.errors.models.imports.wrong_file_extension') before_create :initialize_fields |
