Application_Form/app/models/seminar_banner_image.rb

16 lines
323 B
Ruby
Raw Normal View History

2021-06-17 10:07:43 +00:00
# encoding: utf-8
class SeminarBannerImage
include Mongoid::Document
include Mongoid::Timestamps
mount_uploader :file, AssetUploader
field :description, localize: true
belongs_to :seminar_template_setting
def description_text
Nokogiri::HTML(self.description.to_s).css("body").text() rescue ""
end
end