create_pdf

This commit is contained in:
Andreas Stephanides
2015-04-26 18:08:46 +02:00
parent 408a32ae5f
commit d56d77daef
10 changed files with 96 additions and 3 deletions

View File

@@ -52,6 +52,10 @@ def get_theme
#else
"blue1"
#end
end
def current_ability
@current_ability ||= Ability.new(current_user, request)
end
def default_url_options
{locale: I18n.locale, theme: (theme_name=="blue1") ? nil : theme_name , ansicht: nil}

View File

@@ -25,6 +25,14 @@ class DocumentsController < ApplicationController
end
end
def show
@document = Document.find(params[:id])
respond_to do |format|
format.pdf { send_file @document.create_pdf.path }
format.html
end
end
def dump_to_etherpad
@document = Document.find(params[:id])
@document.dump_to_etherpad