diff --git a/app/models/project.rb b/app/models/project.rb index e01184770..4f80ba256 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1,10 +1,11 @@ class Project < ActiveRecord::Base + belongs_to :platform + validate :name, :uniqueness => true, :presence => true validate :unixname, :uniqueness => true, :presence => true - before_validation :generate_unixname validate :validate_unixname - belongs_to :platform + before_validation :generate_unixname protected