Can't use a name of a folder already existing in the trash bin #343

This commit is contained in:
Karel Pičman 2015-02-06 10:15:33 +01:00
parent bc8499b2c8
commit 0d76bf070d

View File

@ -53,7 +53,7 @@ class DmsfFolder < ActiveRecord::Base
acts_as_customizable
validate :title, :presence => true
validates_uniqueness_of :title, :scope => [:dmsf_folder_id, :project_id]
validates_uniqueness_of :title, :scope => [:dmsf_folder_id, :project_id, :deleted]
validates_format_of :title, :with => @@invalid_characters,
:message => l(:error_contains_invalid_character)