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 44 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) links = formats.collect do |format| link_to format.to_s.upcase, { :format => format}.merge(request.query_parameters.except(:commit, :format)) end div :class => "download_links" do text_node [I18n.t('active_admin.download'), links].flatten.join(" ").html_safe end end