Application_Form/app/models/application_form_banner_ima...

16 lines
340 B
Ruby
Raw Normal View History

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