module ActiveAdmin::ViewHelpers::DownloadFormatLinksHelper
Public Class Methods
included(base)
click to toggle source
# File lib/active_admin/view_helpers/download_format_links_helper.rb, line 43 def self.included base base.extend ClassMethods end
Public Instance Methods
build_download_format_links(formats = self.class.formats)
click to toggle source
TODO: Refactor to new HTML DSL
# File lib/active_admin/view_helpers/download_format_links_helper.rb, line 35 def build_download_format_links(formats = self.class.formats) params = request.query_parameters.except :format, :commit links = formats.map { |format| link_to format.to_s.upcase, params: params, format: format } div class: "download_links" do text_node [I18n.t('active_admin.download'), links].flatten.join(" ").html_safe end end