add fields and model methods to Bulletin

This commit is contained in:
EricTYL 2020-01-13 12:55:14 +08:00
parent ccd06edd25
commit 43b14b8a79
1 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,8 @@ class Bulletin
field :rejection_reason field :rejection_reason
field :is_external_link, :type => Boolean, :default => false field :is_external_link, :type => Boolean, :default => false
field :external_link field :external_link
field :display_subtitle, :type => Boolean, :default => false
field :display_img, :type => Boolean, :default => false
field :email_id field :email_id
field :email_sent, :type => Boolean, :default => false field :email_sent, :type => Boolean, :default => false
@ -94,4 +96,11 @@ class Bulletin
end end
end end
def display_subtitle?
self.display_subtitle rescue false
end
def display_img?
self.display_img rescue false
end
end end