Commit a4a4e260 authored by Valery Sizov's avatar Valery Sizov

ES: fixed bug in snippet indexing

parent 69980498
...@@ -16,4 +16,7 @@ ...@@ -16,4 +16,7 @@
# #
class PersonalSnippet < Snippet class PersonalSnippet < Snippet
# Elastic search configuration (it does not support STI)
document_type 'snippet'
index_name [Rails.application.class.parent_name.downcase, 'snippet', Rails.env].join('-')
end end
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
# #
class ProjectSnippet < Snippet class ProjectSnippet < Snippet
# Elastic search configuration (it does not support STI)
document_type 'snippet'
index_name [Rails.application.class.parent_name.downcase, 'snippet', Rails.env].join('-')
belongs_to :project belongs_to :project
belongs_to :author, class_name: "User" belongs_to :author, class_name: "User"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment