again validateS :attr, not validate :attr
This commit is contained in:
parent
5df5e53f46
commit
4f249b209a
|
@ -2,8 +2,8 @@ class Repository < ActiveRecord::Base
|
||||||
belongs_to :platform
|
belongs_to :platform
|
||||||
has_many :projects, :dependent => :destroy
|
has_many :projects, :dependent => :destroy
|
||||||
|
|
||||||
validate :name, :presence => true, :uniqueness => true
|
validates :name, :presence => true, :uniqueness => true
|
||||||
validate :unixname, :uniqueness => true, :presence => true, :format => { :with => /^[a-zA-Z0-9\-.]+$/ }
|
validates :unixname, :uniqueness => true, :presence => true, :format => { :with => /^[a-zA-Z0-9\-.]+$/ }
|
||||||
|
|
||||||
scope :recent, order("name ASC")
|
scope :recent, order("name ASC")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue