Module: EnjuManifestationViewer::ApplicationHelper

Included in:
ManifestationViewerHelper
Defined in:
app/helpers/enju_manifestation_viewer/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#embed_content(manifestation) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'app/helpers/enju_manifestation_viewer/application_helper.rb', line 7

def embed_content(manifestation)
  if manifestation.youtube_id
    render partial: 'manifestations/youtube', locals: {manifestation: manifestation}
  elsif manifestation.nicovideo_id
    render partial: 'manifestations/nicovideo', locals: {manifestation: manifestation}
  elsif manifestation.flickr.present?
    render partial: 'manifestations/flickr', locals: {manifestation: manifestation}
  elsif manifestation.respond_to?(:ipaper_id)
    render partial: 'manifestations/scribd', locals: {manifestation: manifestation}
  end
end

#google_book_search_preview(isbn) ⇒ Object



3
4
5
# File 'app/helpers/enju_manifestation_viewer/application_helper.rb', line 3

def google_book_search_preview(isbn)
  render partial: 'manifestations/google_book_search', locals: {isbn: isbn}
end