16 lines
310 B
Ruby
16 lines
310 B
Ruby
|
# encoding: utf-8
|
||
|
class PropertyCarouselImage
|
||
|
|
||
|
include Mongoid::Document
|
||
|
include Mongoid::Timestamps
|
||
|
|
||
|
mount_uploader :file, AssetUploader
|
||
|
|
||
|
field :description, localize: true
|
||
|
|
||
|
belongs_to :property
|
||
|
def description_text
|
||
|
Nokogiri::HTML(self.description.to_s).css("body").text() rescue ""
|
||
|
end
|
||
|
end
|