You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've found some instances where SlideImage is extended for an instance not needing the image, or allowing for additional options. Currently the validation is strict in requiring the SlideImage record.
Proposed Solution
Additional logic in the SlideImage::validate() method to allow for customization of the required ImageID field.
Validation should check if the related object has a config override for require_image. If no config is found, it should fall back to the SlideImage's config for require_image. This allows for a global setting (default of true) as well as model specific overrides.
The text was updated successfully, but these errors were encountered:
Summary
We've found some instances where
SlideImage
is extended for an instance not needing the image, or allowing for additional options. Currently the validation is strict in requiring theSlideImage
record.Proposed Solution
Additional logic in the
SlideImage::validate()
method to allow for customization of the requiredImageID
field._config.yml
Validation should check if the related object has a config override for
require_image
. If no config is found, it should fall back to theSlideImage
's config forrequire_image
. This allows for a global setting (default oftrue
) as well as model specific overrides.The text was updated successfully, but these errors were encountered: