diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index b07cd8f9..cc6f956f 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -102,6 +102,6 @@ class DocumentsController < ApplicationController private def document_params - params.require(:document).permit(:title, :body, :deleted_at) + params.require(:document).permit(:title, :body, :deleted_at, :privacy) end end diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 72d3004f..90725ba7 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -18,6 +18,21 @@ <% end %> + + <% if @document.persisted? %> + <%= link_to '#', class: "halfway-fab waves-effect waves-light share", style: 'width: 100%' do %> +