Skip to content

Instantly share code, notes, and snippets.

@Arkham
Created May 16, 2013 16:08
Show Gist options
  • Save Arkham/5592899 to your computer and use it in GitHub Desktop.
Save Arkham/5592899 to your computer and use it in GitHub Desktop.
active_admin monkey patch
module ActiveAdmin
module Views
class PaginatedCollection < ActiveAdmin::Component
protected
def build_pagination_with_formats(options)
div :id => "index_footer" do
build_pagination
div(page_entries_info(options).html_safe, :class => "pagination_information")
download_links = @download_links.is_a?(Proc) ? instance_eval(&@download_links) : @download_links
if download_links.is_a?(Array) && !download_links.empty?
build_download_format_links download_links
else
build_download_format_links unless download_links == false
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment