meeting style

This commit is contained in:
Andreas Stephanides
2015-03-15 13:09:05 +01:00
parent 3cc9de7d29
commit 34c0374877
11 changed files with 55 additions and 24 deletions

View File

@@ -39,7 +39,17 @@ class Neuigkeit < ActiveRecord::Base
before_validation :sanitize
after_save :update_cache
def picture_robust
unless self.picture.url.nil?
return self.picture
else
if self.has_meeting?
return self.meeting.meetingtyp.picture
else
return self.picture
end
end
end
def is_annoncement?
!self.meeting.nil?
end