AutoCommit Son Aug 30 14:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-30 14:03:01 +02:00
parent 723d7be980
commit 5bf63421a6
9 changed files with 64 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ class Studium < ActiveRecord::Base
has_many :lvas, :through=>:moduls
has_many :semester, :dependent => :destroy
has_many :attachments, :as=>:parent
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
validates :typ, :inclusion => {:in => ["Bachelor","Master"] }
validates :name, :uniqueness => true, :presence=>true
validates :zahl, :presence=>true, :format=>{:with=>/^[0-9A-Z]{4,10}$/}, :uniqueness => true