We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a nested resource, like /libraries/15/commits and want to import commits from css.
/libraries/15/commits
Is it possible to get the parent resource id and add it on the fly?
I could see the parent id in the Better Errors' dump as a Request parameters > library_id but can't figure how to catch it.
Request parameters > library_id
Thank you in advance.
The text was updated successfully, but these errors were encountered:
@lifecoderua , you can override template and add hidden input with library_id to make it model attribute https://github.com/activeadmin-plugins/active_admin_import/blob/master/lib/active_admin_import/model.rb#L31 Template should be passed as option when declaring active_admin_import for your resource
active_admin_import
Sorry, something went wrong.
Sort of this is possible
before_filter only: [:do_import] do Thread.current['import.library_id'] = params['library_id'] end active_admin_import before_batch_import: ->(importer) do importer.headers["library_id"] = :library_id importer.batch_replace(:library_id, { nil => Thread.current['import.library_id']} ) end
"before_filter" should change to "before_action" in Rails5.2
No branches or pull requests
I have a nested resource, like
/libraries/15/commits
and want to import commits from css.Is it possible to get the parent resource id and add it on the fly?
I could see the parent id in the Better Errors' dump as a
Request parameters > library_id
but can't figure how to catch it.Thank you in advance.
The text was updated successfully, but these errors were encountered: