Commit 6b87eaac authored by Valery Sizov's avatar Valery Sizov

ES: fixes for snippets

parent a4a4e260
......@@ -19,4 +19,5 @@ 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('-')
include Elastic::SnippetsSearch
end
......@@ -19,6 +19,7 @@ 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('-')
include Elastic::SnippetsSearch
belongs_to :project
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