create_pdf
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user