Table name: fetprofiles
id :integer not null, primary key vorname :string(255) nachname :string(255) short :string(255) fetmailalias :string(255) desc :text picture :string(255) active :boolean created_at :datetime not null updated_at :datetime not null
# File app/models/fetprofile.rb, line 58 def adress connector= (self.street.nil?||self.street.empty?||(self.city.empty? && self.plz.empty?)) ? '' : ', ' self.plz.to_s + ' ' + self.city.to_s + connector.to_s + self.street.to_s end
# File app/models/fetprofile.rb, line 62 def birthday unless self.birth_month.nil? || self.birth_day.nil? if self.birth_year.nil? || self.birth_year.zero? Date.new( Date.today.year,self.birth_month,self.birth_day) else Date.new( self.birth_year,self.birth_month,self.birth_day) end else nil end end
# File app/models/fetprofile.rb, line 55 def fetmail (fetmailalias.nil? || fetmailalias.empty?) ? short.to_s + "@fet.at" : fetmailalias.to_s + "@fet.at" end
# File app/models/fetprofile.rb, line 51 def name [vorname, nachname, ((short.empty?)? "": ["(",short,")"].join)].join(" ") end
# File app/models/fetprofile.rb, line 33 def validate_birthday unless birth_month.nil? || birth_day.nil? unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day) errors.add(:birth_month, "Invalides Datum") errors.add(:birth_day, "Invalides Datum") v= false else v= true end else v= false end v end
Generated with the Darkfish Rdoc Generator 2.