modul code clean up

This commit is contained in:
Andreas Stephanides
2014-04-02 14:31:30 +02:00
parent b990510212
commit 484776802a
7 changed files with 101 additions and 67 deletions

View File

@@ -25,4 +25,8 @@ class Modulgruppe < ActiveRecord::Base
validates :phase, :inclusion => {:in => [1, 2, 3, 4]}
validates :typ, :inclusion => {:in => ["Pflicht","Vertiefungspflicht","Wahl"] }
translates :desc, :versioning =>true,:fallbacks_for_empty_translations => true
def studium_name
self.studium.nil? ? "Kein Studium vorhanden" : self.studium.name
end
end