Skip to content
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

Merged
merged 9 commits into from Aug 30, 2019
Merged

Feature/documents export #43

merged 9 commits into from Aug 30, 2019

Conversation

kowal
Copy link
Contributor

@kowal kowal commented Aug 28, 2019

Summary

  • Add a link to documents.csv on the legislations and litigations index pages.
  • update CSV columns for documents to Id, Name, External URL, language, Last verified on, Law ID, Documentable ID, Documentable Type
  • added new controller specs for CSV download

Zrzut ekranu 2019-08-29 o 15 10 15


Zrzut ekranu 2019-08-29 o 15 10 54

@kowal kowal marked this pull request as ready for review August 29, 2019 09:14
@kowal kowal requested a review from tsubik August 29, 2019 13:09

if documentable_klass.present? && documentable_params.present?
results = results.where(
documentable: documentable_klass.ransack(documentable_params).result
Copy link
Contributor Author

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)

column :external_url
column :language
column :last_verified_on
column 'Law ID', &:document_legacy_law_id
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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

Copy link
Collaborator

@tsubik tsubik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tsubik tsubik merged commit 8866db5 into develop Aug 30, 2019
@tsubik tsubik deleted the feature/documents-export branch August 30, 2019 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants