diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index c9bf20abd..0c95870ef 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -67,3 +67,7 @@ " /> <% end %> + +<% if @post %> + <%= render 'posts/schema', post: @post %> +<% end %> \ No newline at end of file diff --git a/app/views/posts/_schema.html.erb b/app/views/posts/_schema.html.erb new file mode 100644 index 000000000..13774c93a --- /dev/null +++ b/app/views/posts/_schema.html.erb @@ -0,0 +1,27 @@ +<% if post && post.post_type.name == 'Question' %> + <% suggested_answers = @children.filter { |answer| answer.score > 0.5 } %> + +<% end %> \ No newline at end of file