app/models/ckeditor/picture.rb in georgia-0.7.8 vs app/models/ckeditor/picture.rb in georgia-0.8.0
- old
+ new
@@ -1,7 +1,13 @@
class Ckeditor::Picture < Ckeditor::Asset
+ include Elasticsearch::Model
+ include Elasticsearch::Model::Callbacks
+ index_name 'ckeditor-assets'
+ document_type 'asset'
+ include Ckeditor::AssetSearch
+
mount_uploader :data, Ckeditor::PictureUploader, mount_on: :data_file_name
has_many :contents, foreign_key: :image_id, class_name: Georgia::Content
def featured?
@@ -17,8 +23,12 @@
if defined?(Cloudinary)
data_file_name.dup.gsub(/v\d{10}\/(.*)/, '\1') || data_file_name
else
data_file_name
end
+ end
+
+ def image?
+ true
end
end
\ No newline at end of file