randym / activeadmin-axlsx

ActiveAdmin plugin using Axlsx for adding Excel (xlsx) download links for your resources
MIT License
82 stars 134 forks source link

"wrong number of arguments (1 for 0)", activeadmin (1.0.0.pre) ruby 2.1.2 and rails 4.1.5 #36

Open codemilan opened 10 years ago

zurzer commented 9 years ago

yourproject/config/environments/production.rb set config.eager_load = false

activeadmin-axlsx/activeadmin-axlsx.gemspec s.add_runtime_dependency 'activeadmin', "~> 0.6.0" to s.add_runtime_dependency 'activeadmin', "> 0.6.0"

ArgumentError (wrong number of arguments (1 for 0)): activeadmin/lib/active_admin/resource_controller/streaming.rb:11:in `index' Change line 11 def index to def index(arg=nil)

activeadmin-axlsx/lib/active_admin/axlsx/resource_controller_extension.rb:11:in `per_page_with_xlsx' def per_page_with_xlsx

add

      max_csv_records = 1000
      if request.format ==  Mime::Type.lookup_by_extension(:xlsx)
        return max_csv_records
      end
      per_page_without_xlsx
  end
bhargavd commented 4 years ago

This change works perfect in local but how to have this fix in production