activeadmin-axlsx icon indicating copy to clipboard operation
activeadmin-axlsx copied to clipboard

index_without_xlsx(options) fails with wrong number of arguments (1 for 0)

Open jasper502 opened this issue 8 years ago • 1 comments

lib/active_admin/axlsx/resource_controller_extension.rb

index_without_xlsx(options) fails with:

wrong number of arguments (1 for 0)

      def index_with_xlsx(options={}, &block)
        index_without_xlsx(options) do |format|
           format.xlsx do
            xlsx = active_admin_config.xlsx_builder.serialize(collection)
            send_data xlsx.to_stream.read, :filename => "#{xlsx_filename}", :type => Mime::Type.lookup_by_extension(:xlsx)
          end
        end

All my active admin index pages fail with the same error

jasper502 avatar Jun 25 '16 05:06 jasper502

This is the same issue as #42 ; fortunately there seems to be a fix in a fork (haven't tried it myself yet but it looks great so far): https://github.com/ybart/activeadmin-axlsx/commit/cb090ada3f6fe079d7f36f3ac2cb09cebd2c001d

Bastes avatar Jul 08 '16 07:07 Bastes