I have the following 2 models:
class Offer < ApplicationRecord
has_many :bookings
end
class Booking < ApplicationRecord
belongs_to :offer
end
When I attempt to save a Booking object without an offer_id, Rails throws a validation error "Offer is required".
But I don't actively validate for presence of associated objects (I intended to add a conditional validation for this association later).
Does that mean that Rails 6 validates the presence of all associations by default? And if yes, how can I make such a validation a conditional one?