Class: Lcms::Engine::MaterialsController

Inherits:
Admin::AdminController
  • Object
show all
Defined in:
app/controllers/lcms/engine/materials_controller.rb

Instance Method Summary collapse

Instance Method Details

#preview_gdocObject



17
18
19
20
21
22
23
# File 'app/controllers/lcms/engine/materials_controller.rb', line 17

def preview_gdoc
  if (url = @material.preview_links['gdoc']).present? && url !~ MaterialPreviewGenerator::GDOC_BROKEN_RE
    return redirect_to url
  end

  preview_for :gdoc, folder_id: ENV.fetch('GOOGLE_APPLICATION_PREVIEW_FOLDER_ID')
end

#preview_pdfObject



9
10
11
12
13
14
15
# File 'app/controllers/lcms/engine/materials_controller.rb', line 9

def preview_pdf
  if (url = @material.preview_links['pdf']).present?
    return redirect_to url
  end

  preview_for :pdf
end

#showObject



25
# File 'app/controllers/lcms/engine/materials_controller.rb', line 25

def show; end