Coder Social home page Coder Social logo

Comments (10)

dyerc avatar dyerc commented on August 20, 2024 1

I just looked into this again and your solution @andreibondarev works perfectly but only in administrate (0.12.0).

When I compared this administrate file between the 0.11.0 and 0.12.0 tags it looks as though they changed apply_resource_includes to become apply_collection_includes. Maybe to properly close this issue it would be best to set a dependency in the gemspec to require 0.12.0

from administrate_exportable.

tuxtux59 avatar tuxtux59 commented on August 20, 2024

Hi,
I face the same problem today.

My workaround was to rewrite AdministrateExportable::ExporterService#collection in an initializer Like so:

require 'administrate/base_dashboard'
AdministrateExportable::ExporterService.class_eval do
  def collection
    # code your stuff here like resource_includes = []
  end
end

from administrate_exportable.

andreibondarev avatar andreibondarev commented on August 20, 2024

@tuxtux59 What version of this gem are you running?

from administrate_exportable.

tuxtux59 avatar tuxtux59 commented on August 20, 2024

@tuxtux59 What version of this gem are you running?

@andreibondarev

  • administrate (0.11.0)
  • administrate_exportable (0.1.2)

from administrate_exportable.

andreibondarev avatar andreibondarev commented on August 20, 2024

@tuxtux59 Can you try the administrate_exportable (0.1.3)?

from administrate_exportable.

dyerc avatar dyerc commented on August 20, 2024

@andreibondarev thanks for the update. I've just upgraded to version 0.1.3 but the problem persists, albeit with a slightly different error this time:

NoMethodError (undefined method `apply_collection_includes' for #<Admin::PlayersController:0x000055dbb256b060>
Did you mean?  apply_resource_includes):
 administrate_exportable (0.1.3) lib/administrate_exportable/exporter.rb:16:in `block in exportable'
[f8b0cb20-67c3-4879-a1fd-8d0f6e056832] actionpack (5.2.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'

from administrate_exportable.

andreibondarev avatar andreibondarev commented on August 20, 2024

@dyerc Would you like to submit a PR?

from administrate_exportable.

dyerc avatar dyerc commented on August 20, 2024

Yes no problem. Would you prefer 0.1.4 or 0.2.0 since it's not backwards compatible?

from administrate_exportable.

andreibondarev avatar andreibondarev commented on August 20, 2024

@dyerc 0.2.0 sounds right.

from administrate_exportable.

andreibondarev avatar andreibondarev commented on August 20, 2024

@dyerc Thank you for the fix! Releasing a new gem version shortly.

from administrate_exportable.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.