New issue
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
Feature/documents export #43
Conversation
0943375
to
7eb3c53
Compare
e00c881
to
beeab54
Compare
|
||
if documentable_klass.present? && documentable_params.present? | ||
results = results.where( | ||
documentable: documentable_klass.ransack(documentable_params).result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsubik thanks for improving this! works like a charm now)
Currently selected Legislations filters must be preserved when generating CSV for Documents.
beeab54
to
5c7e268
Compare
app/admin/documents.rb
Outdated
column :external_url | ||
column :language | ||
column :last_verified_on | ||
column 'Law ID', &:document_legacy_law_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need that legacy law ID for our import/export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only way to match documents with legislations. This could be handy during: export -> manual change -> import
scenario. Also, it doesn't break anything.
I do agree that in the future, after the initial import, this probably will be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's documentable_id for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I removed this for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Summary
documents.csv
on the legislations and litigations index pages.Id, Name, External URL, language, Last verified on, Law ID, Documentable ID, Documentable Type