Skip to content

Conversation

@MisterOryon
Copy link
Contributor

No description provided.

Modified the `request_distributions` schema to replace the `area` with `positions_on_bench` and `dimensions`.
Updated related blueprints, tests, and fixtures to accommodate this change.
Enhanced validation checks within the `RequestDistribution` model for dimensions and positions attributes to ensure correctness.
Simplified routes by adjusting the `request_distributions` index action.
The `invalid_distribution` translation key was removed from both French and English locale files as it is no longer needed.
This simplifies the localization files by eliminating unused entries.
…_than_bench_area`.

Moved `dimensions` initialization outside the loop block to avoid redundant calls.
Extract validation logic for dimensions into a new `ValidateDimensionsConcern` module to enforce DRY principles.
Updated `Bench` and `RequestDistribution` models to include the concern and adjusted related test cases accordingly.
Localized error messages have also been updated for consistency.
Extract position validation logic into `ValidatePositionsConcern` for reusability and consistency.
Updated relevant models, tests, and locale files to accommodate the shared validation module.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2025

@MisterOryon MisterOryon merged commit e3abbc7 into master Jan 8, 2025
6 checks passed
@MisterOryon MisterOryon deleted the feat/plant-seeds-v2 branch January 8, 2025 09:55
Copy link
Member

@Tao-Galasse Tao-Galasse left a comment

Choose a reason for hiding this comment

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

Très cool l'utilisation du concern, bravo :) 👌

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.

4 participants