attachments for studium

This commit is contained in:
Andreas Stephanides
2015-04-07 23:22:31 +02:00
parent 6c3c98c919
commit 04b6bcac8a
2 changed files with 3 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ class Studium < ActiveRecord::Base
has_many :moduls, :through=>:modulgruppen
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 :typ, :inclusion => {:in => ["Bachelor","Master"] }
validates :name, :uniqueness => true, :presence=>true