* Add new columns to notifications table * Remove stream from notifications and add new methods * Turn off moderation comment notifications * Add notifiable_type index to migration * Stop creation of Stream-based notification model instances * Add notification model create hooks * Add badge achievement notification creation hook * Fix some specs * Add missing @ symbol * Fix for tests and rename a few things * forgot to uncomment code sigh
10 lines
302 B
Ruby
10 lines
302 B
Ruby
class Broadcast < ApplicationRecord
|
|
has_many :notifications, as: :notifiable
|
|
|
|
validates :title, :type_of, :processed_html, presence: true
|
|
validates :type_of, inclusion: { in: %w(Announcement Onboarding) }
|
|
|
|
def get_inner_body(content)
|
|
Nokogiri::HTML(content).at("body").inner_html
|
|
end
|
|
end
|