Module: Estella::Helpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/estella/helpers.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- @@types =
[]
Class Method Summary collapse
-
.types ⇒ Object
track dependent classes for spec support.
Instance Method Summary collapse
Class Method Details
.types ⇒ Object
track dependent classes for spec support
19 20 21 |
# File 'lib/estella/helpers.rb', line 19 def self.types @@types end |
Instance Method Details
#es_delete ⇒ Object
30 31 32 |
# File 'lib/estella/helpers.rb', line 30 def es_delete self.class.es_delete_document(id) end |
#es_index ⇒ Object
23 24 25 26 27 28 |
# File 'lib/estella/helpers.rb', line 23 def es_index self.es_indexing = true __elasticsearch__.index_document ensure self.es_indexing = nil end |
#es_transform ⇒ Object
34 35 36 |
# File 'lib/estella/helpers.rb', line 34 def es_transform { index: { _id: id.to_s, data: as_indexed_json } } end |