Last Updated: February 25, 2016
·
3.005K
· davidcollom

ActiveAdmin - Disable JSON/XML export

Monkey Patch:

module ActiveAdmin
  module Views
    class PaginatedCollection
      def build_pagination_with_formats(options)
        div :id => "index_footer" do
          build_pagination
          div(page_entries_info(options).html_safe, :class => "pagination_information")
          build_download_format_links([:csv]) unless @download_links == false
        end
      end
    end
  end
end

Change line:

build_download_format_links([:csv]) 

To Suite export formats required