From 8d6d64b0655033c3e79aa26cbfb4bde0a495fd92 Mon Sep 17 00:00:00 2001 From: "Timothy N. Tsvetkov" Date: Thu, 31 Mar 2011 05:55:10 +0400 Subject: [PATCH] and again validats :attr not validte :attr --- app/models/project.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 74ee9c341..2d4b41837 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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