Add legal documents view

This commit is contained in:
Martin Lensment 2014-12-30 12:14:55 +02:00
parent 038e03a16f
commit 3adab3f0ae
6 changed files with 31 additions and 0 deletions

View 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