mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Add legal documents view
This commit is contained in:
parent
038e03a16f
commit
3adab3f0ae
6 changed files with 31 additions and 0 deletions
9
app/controllers/admin/legal_documents_controller.rb
Normal file
9
app/controllers/admin/legal_documents_controller.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class Admin::LegalDocumentsController < AdminController
|
||||
load_and_authorize_resource
|
||||
|
||||
def show
|
||||
@ld = LegalDocument.find(params[:id])
|
||||
file = Base64.decode64(@ld.body)
|
||||
send_data file, filename: "#{@ld.created_at}.#{@ld.document_type}"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue