Module: UploadsHelper

Defined in:
app/helpers/uploads_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_list_all_images(upload = nil) ⇒ Object

include ActionController::UrlFor include ActionView::Helpers include Rails.application.routes.url_helpers include ActionView::AssetPaths include ActionView::Helpers::AssetTagHelper include Sprockets::Helpers::IsolatedHelper



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/helpers/uploads_helper.rb', line 9

def render_list_all_images(upload = nil)
  html = ""
  return html unless upload and upload.image_file?
  
  html << image_tag(upload.upload(:medium))
  links = []
  [:original, :large, :big, :medium, :thumb, :mini].each do |size|
    # links << FastImage.size(upload.upload(size).to_s)
    # link_to() do
    #   t(".#{size}")
    # end
  end
  html << (:div, links.join("\n"), class: "links_box")

end