Revision 10428ed3
Added by Ohad Levy over 11 years ago
- ID 10428ed3a5308f008aa88726c930d819c4ceadae
app/models/ptable.rb | ||
---|---|---|
validates_uniqueness_of :name
|
||
validates_presence_of :layout
|
||
validates_format_of :name, :with => /\A(\S+\s?)+\Z/, :message => "can't be blank or contain trailing white spaces."
|
||
validates_inclusion_of :os_family, :in => Operatingsystem.families, :allow_nil => true
|
||
default_scope :order => 'LOWER(ptables.name)'
|
||
|
||
scoped_search :on => :name, :complete_value => true, :default_order => true
|
||
... | ... | |
super({:only => [:name, :id]}.merge(options))
|
||
end
|
||
|
||
def os_family=(value)
|
||
super(value.blank? ? nil : value)
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
Revert "ptables - validation for OS families"
This reverts commit b33f440434244fff5af7d036b43b6068c1b74e08.
This patch does not really work, and was merged with insufficent
tests... sorry about that.