lib/georgia/indexer/extensions/tire_adapter/ckeditor/asset.rb in georgia-0.7.7 vs lib/georgia/indexer/extensions/tire_adapter/ckeditor/asset.rb in georgia-0.7.8
- old
+ new
@@ -10,10 +10,14 @@
included do
include ::Tire::Model::Search
include ::Tire::Model::Callbacks
+ after_rollback do
+ self.index.remove(self)
+ end
+
def to_indexed_json
indexed_hash = {
widt: width,
height: height,
data_file_name: data_file_name,
@@ -40,10 +44,10 @@
must { string params[:query], default_operator: "AND" }
end
end
sort { by (params[:o] || :updated_at), (params[:dir] || :desc) } if params[:query].blank?
end
- end.results
+ end
end
end
end
\ No newline at end of file