forked from bofh/fetsite
attachment titlepic for neuigkeit
This commit is contained in:
@@ -45,11 +45,15 @@ class Neuigkeit < ActiveRecord::Base
|
|||||||
else
|
else
|
||||||
if self.has_meeting?
|
if self.has_meeting?
|
||||||
return self.meeting.meetingtyp.picture
|
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
|
else
|
||||||
return self.picture
|
return self.picture
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
def is_annoncement?
|
def is_annoncement?
|
||||||
!self.meeting.nil?
|
!self.meeting.nil?
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user