diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-04-25 07:18:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-04-25 07:18:11 +0000 |
commit | d904292635b1479766f6eb3d503213f8c3c10ec0 (patch) | |
tree | 242b3af6a8e96c43387d5da4e5c7ee388d4e29ca /app | |
parent | b12e8396720969c01046b19e91c8ff18aa9e07e0 (diff) | |
download | redmine-d904292635b1479766f6eb3d503213f8c3c10ec0.tar.gz redmine-d904292635b1479766f6eb3d503213f8c3c10ec0.zip |
Merged r14156 and r14161 (#19400).
git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14197 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 472bf615b..ec7890415 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -30,6 +30,7 @@ class Repository < ActiveRecord::Base serialize :extra_info + before_validation :normalize_identifier before_save :check_default # Raw SQL to delete changesets and changes in the database @@ -469,6 +470,10 @@ class Repository < ActiveRecord::Base end end + def normalize_identifier + self.identifier = identifier.to_s.strip + end + def check_default if !is_default? && set_as_default? self.is_default = true |