and again validats :attr not validte :attr
This commit is contained in:
parent
e40cdbd9d3
commit
8d6d64b065
|
@ -1,8 +1,8 @@
|
|||
class Project < ActiveRecord::Base
|
||||
belongs_to :repository
|
||||
|
||||
validate :name, :uniqueness => true, :presence => true, :allow_nil => false, :allow_blank => false
|
||||
validate :unixname, :uniqueness => true, :presence => true, :format => { :with => /^[a-zA-Z0-9\-.]+$/ }, :allow_nil => false, :allow_blank => false
|
||||
validates :name, :uniqueness => true, :presence => true, :allow_nil => false, :allow_blank => false
|
||||
validates :unixname, :uniqueness => true, :presence => true, :format => { :with => /^[a-zA-Z0-9\-.]+$/ }, :allow_nil => false, :allow_blank => false
|
||||
|
||||
include Project::HasRepository
|
||||
|
||||
|
|
Loading…
Reference in New Issue