-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: paid subscriptions system and articles #467
Merged
Merged
+3,146
−394
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: DioFun <[email protected]> Co-authored-by: Nymous <[email protected]>
todo: fix tests
Loading status checks…
…le table
Loading status checks…
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #467 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 26 48 +22
Lines 337 670 +333
Branches 35 53 +18
==========================================
+ Hits 337 670 +333 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Loading status checks…
Loading status checks…
When using create_join_table, Rails doesn't know how to destroy the association because there is no primary key. Moving the `dependent: :destroy` to the `has_many: :through` relation works but might feel weird (it looks like it will delete the articles when we delete a sale, but it only deletes the join records). Adding a composite primary key spanning both references in the join column works better and is semantically more precise (we only ever have one couple of sale<->article). This commit also squashes some migrations from this pull request, like giving the correct name to columns from the start.
Loading status checks…
Ruby 3.1 will be EOL at the end of March 2025. Once this branch is merged we will upgrade all dependencies, but for now we need to ignore it temporarily.
Loading status checks…
…ffer, Sales and Dashboard
This helps surface the fact that articles, subscription offers and payment methods should only be created, not updated once they have been used. Also adds a tab in coverage HTML export to track which files have a :nocov: comment, to avoid overuse.
Because we want to precisely control the invoices ID, removing the Rails default auto-increment on the column ensure that if we forget to set an explicit ID, the database will complain.
nymous
approved these changes
Mar 19, 2025
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.
FINALLY
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Le but est d'avoir un suivi et des correctifs aux fur et à mesure pour le moment quant au système d'abonnement payant.
Développement de la gestion des articles et abonnements payants.
La gestion des remboursements sera effectuée dans une autre PR
links to #455