Sha256: d661c44c3959e2f406b9130dbb026879ce5e1ba55cd3cc5d11685130078ad4cb
Contents?: true
Size: 810 Bytes
Versions: 3
Compression:
Stored size: 810 Bytes
Contents
class Post < ActiveRecord::Base include Searchable has_and_belongs_to_many :categories, after_add: [ lambda { |a,c| a.__elasticsearch__.index_document } ], after_remove: [ lambda { |a,c| a.__elasticsearch__.index_document } ] has_many :authorships has_many :authors, through: :authorships, after_add: [ lambda { |a,c| a.__elasticsearch__.index_document } ], after_remove: [ lambda { |a,c| a.__elasticsearch__.index_document } ] has_many :comments, after_add: [ lambda { |a,c| a.__elasticsearch__.index_document } ], after_remove: [ lambda { |a,c| a.__elasticsearch__.index_document } ] after_touch() { __elasticsearch__.index_document } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
elasticsearch-model-6.1.2 | spec/support/app/post.rb |
elasticsearch-model-6.1.1 | spec/support/app/post.rb |
elasticsearch-model-6.1.0 | spec/support/app/post.rb |