reformatted a bit project model

This commit is contained in:
Timothy N. Tsvetkov 2011-03-10 15:35:23 +03:00
parent 9eba4ca4d9
commit de2dc18249
1 changed files with 3 additions and 2 deletions

View File

@ -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