spree-contrib / spree_print_invoice

Create a PDF invoice for Spree orders.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
91 stars 239 forks source link

Refactoring the migration. #145

Closed imgarylai closed 4 years ago

imgarylai commented 4 years ago

This PR is relevant to #122 & #139.

Initially, the migration was irreversible. It isn't suitable for people who want to uninstall this extension. Instead of generating all documents during the migration, I borrow the idea from PR #122. Let users generate documents on demand.

Additionally, since this gem hasn't support file uploading yet, the original way can cause chaos on the production server. I, thus, want to propose to remove the documents generation during the migration.

A few tweaks in the order_decorator and engine are included in this PR.

imgarylai commented 4 years ago

Should we let LineLength longer for this project? 😅