Skip to content

Commit

Permalink
Rails 7.1: don't over-validate parents
Browse files Browse the repository at this point in the history
Optimises presence validations by removing an extra query.
  • Loading branch information
rgarner committed Feb 6, 2025
1 parent c99fcac commit 25c402a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/new_framework_defaults_7_1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
# The previous behavior was to validate the presence of the parent record, which performed an extra query
# to get the parent every time the child record was updated, even when parent has not changed.
#++
# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false
Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false

###
# Enable precompilation of `config.filter_parameters`. Precompilation can
Expand Down

0 comments on commit 25c402a

Please sign in to comment.