docbrown/app/models/concerns
Joshua Wehner a20cf3e02b
Unique cross-model-slug check is likely misconfigured (#19263)
* Page unique_cross_model_slug seems misconfigured

* Update validator test

* More verbose invalid attribute message

* Try dynamic model/attribute registration

* Rubocop

* Use the cross-model-slug existence check

* Register with the dynamic cross-model-slug checker

* Cleanup

* Add missing keys to fr

* Update format regex

* Adjust validation: always presence, unique if changed

* Tests can create reserved-word pages when they need to

* Slugs can be mixed case?

* Case-sensitive is better, actually

* Refactor to use CrossModel check

* Refactor, rename for clarity

* Refactor, avoid mocking oneself

* Refactor, injectable everything

* Add reservedword check to extracted exists? checker

* Move to concerns

* Without dynamic registration

* extend when needed

* Cleanup comments, remove registration references

---------

Co-authored-by: Goran <gorang.pub@gmail.com>
2023-04-07 17:04:45 +02:00
..
.keep Initial commit 2018-02-28 16:11:08 -05:00
purgeable.rb Allow Nginx cached static content to be purged (#9857) [deploy] 2020-08-21 09:31:23 -07:00
reactable.rb (Really) Enable multiple reactions on #index (#19202) 2023-03-22 10:20:00 -04:00
taggable.rb Display Ads: Target by Tag on Posts with matching Tag(s) on the user facing side (#18664) 2022-11-03 15:51:51 +02:00
unique_across_models.rb Unique cross-model-slug check is likely misconfigured (#19263) 2023-04-07 17:04:45 +02:00
user_subscription_sourceable.rb [deploy] Set UserSubscription sourceable columns to nullable (#10033) 2020-08-27 16:25:48 +02:00