Files
grecia/config/initializers
Javi Martín 529b4d2a98 Don't validate foreign key in required belongs_to
Before this change, every time we saved a record, the association was
validated if we had `belongs_to :something, required: true`. After this
change [1], it's only validated if the `something_id` column is nil (or
`something_type` for polymorphic associations) or if the `something_id`
attribute has changed.

The main difference is that we no longer get validation errors if the
associated record has been deleted. Doesn't affect us much, so we're
going with the new default value.

[1] Pull request 46522 in https://github.com/rails/rails
2025-05-20 15:38:52 +02:00
..
2024-11-13 15:55:20 +01:00
2020-06-16 13:47:38 +02:00
2023-10-24 19:00:43 +02:00
2023-11-23 18:21:29 +01:00
2024-04-15 15:39:23 +02:00
2017-04-03 12:30:57 +02:00
2025-05-20 13:12:29 +02:00
2025-03-05 15:40:03 +01:00