forked from bofh/fetsite
attachment titlepic for neuigkeit
This commit is contained in:
@@ -45,11 +45,15 @@ class Neuigkeit < ActiveRecord::Base
|
||||
else
|
||||
if self.has_meeting?
|
||||
return self.meeting.meetingtyp.picture
|
||||
else
|
||||
unless self.attachments.where(flag_titlepic: true).first.nil?
|
||||
return self.attachments.where(flag_titlepic: true).first.datei
|
||||
else
|
||||
return self.picture
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
def is_annoncement?
|
||||
!self.meeting.nil?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user