diff --git a/app/models/platform.rb b/app/models/platform.rb index 56501ba57..9897e8b44 100644 --- a/app/models/platform.rb +++ b/app/models/platform.rb @@ -20,7 +20,7 @@ class Platform < ActiveRecord::Base after_create :make_owner_rel # before_save :create_directory before_save :make_owner_rel - after_destroy :remove_directory +# after_destroy :remove_directory before_create :xml_rpc_create before_destroy :xml_rpc_destroy # before_update :check_freezing diff --git a/app/models/repository.rb b/app/models/repository.rb index 3ec080996..b79eb6c49 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -15,8 +15,8 @@ class Repository < ActiveRecord::Base has_many :members, :through => :objects, :source => :object, :source_type => 'User' has_many :groups, :through => :objects, :source => :object, :source_type => 'Group' - validates :name, :uniqueness => {:scope => [:owner_id, :owner_type]}, :presence => true - validates :unixname, :uniqueness => {:scope => [:owner_id, :owner_type]}, :presence => true, :format => { :with => /^[a-zA-Z0-9\-.]+$/ } + validates :name, :uniqueness => {:scope => :platform_id}, :presence => true + validates :unixname, :uniqueness => {:scope => :platform_id}, :presence => true, :format => { :with => /^[a-zA-Z0-9\-.]+$/ } validates :platform_id, :presence => true scope :recent, order("name ASC")