Module: ActiveAdmin::ViewHelpers::DownloadFormatLinksHelper

Included in:
ActiveAdmin::Views::Pages::Index, ActiveAdmin::Views::PaginatedCollection
Defined in:
lib/active_admin/view_helpers/download_format_links_helper.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details


5
6
7
8
9
10
11
12
13
# File 'lib/active_admin/view_helpers/download_format_links_helper.rb', line 5

def build_download_format_links(formats = self.class.formats)
  params = request.query_parameters.except :format, :commit
  div class: "download_links" do
    span I18n.t('active_admin.download')
    formats.each do |format|
      a format.upcase, href: url_for(params: params, format: format)
    end
  end
end