fix save modulgruppen

This commit is contained in:
Andreas Stephanides
2014-04-02 15:32:30 +02:00
parent c0d30f3e38
commit 42312b6bc9
3 changed files with 5 additions and 7 deletions

View File

@@ -25,7 +25,9 @@ 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 long_name
self.studium_name + ": "+ name
end
def studium_name
self.studium.nil? ? "Kein Studium vorhanden" : self.studium.name
end