Comments (10)
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.
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.
@tuxtux59 What version of this gem are you running?
from administrate_exportable.
@tuxtux59 What version of this gem are you running?
administrate (0.11.0)
administrate_exportable (0.1.2)
from administrate_exportable.
@tuxtux59 Can you try the administrate_exportable (0.1.3)
?
from administrate_exportable.
@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.
@dyerc Would you like to submit a PR?
from administrate_exportable.
Yes no problem. Would you prefer 0.1.4 or 0.2.0 since it's not backwards compatible?
from administrate_exportable.
@dyerc 0.2.0
sounds right.
from administrate_exportable.
@dyerc Thank you for the fix! Releasing a new gem version shortly.
from administrate_exportable.
Related Issues (11)
- Filter data based on custom scoped_resource HOT 5
- Field::Text truncated to 50 characters on export HOT 1
- Does not work with HasOne associations
- Interference with Turbolinks HOT 1
- Error on export with Administrate 0.12.0 HOT 5
- Export service does not handle date fields
- Broken pagination with administrate-0.15.0 HOT 4
- Generating several N+1 queries when adding multiple resources to an export thus slowing down query and timing out Heroku HOT 5
- Error: Please use symbols for polymorphic route arguments. HOT 2
- Fix security vulnerabilities HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from administrate_exportable.