This commit is contained in:
r888888888
2013-09-26 17:25:01 -07:00
parent 9e45158423
commit 989a04be97
2 changed files with 10 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ require 'ostruct'
class Pool < ActiveRecord::Base
validates_uniqueness_of :name
validates_format_of :name, :with => /\A[^\s,]+\Z/, :on => :create, :message => "cannot have whitespace or commas"
validates_format_of :name, :with => /\A[^\s,]+\Z/, :message => "cannot have whitespace or commas"
validates_inclusion_of :category, :in => %w(series collection)
belongs_to :creator, :class_name => "User"
belongs_to :updater, :class_name => "User"