https://svn.lrde.epita.fr/svn/ranch/trunk
Index: ChangeLog
from Nicolas Desprès <nicolas.despres(a)lrde.epita.fr>
System validates rules.
* web/ranch/app/models/system.rb: Add system fields validates rules.
system.rb | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: web/ranch/app/models/system.rb
--- web/ranch/app/models/system.rb (revision 35)
+++ web/ranch/app/models/system.rb (working copy)
@@ -2,7 +2,15 @@
has_many :output
- validates_presence_of :hostname, :info
+ validates_presence_of :hostname
validates_length_of :hostname, :maximum => 128
+ validates_length_of :kernel_name, :maximum => 128
+ validates_length_of :kernel_version, :maximum => 128
+ validates_length_of :host_type, :maximum => 128
+ validates_length_of :os_name, :maximum => 128
+ validates_length_of :os_version, :maximum => 128
+ validates_length_of :comp_name, :maximum => 128
+ validates_length_of :comp_version, :maximum => 128
+ validates_length_of :comp_flags, :maximum => 128
end