Skip to content

Commit

Permalink
Temporary override of the belongs_to_required_by_default setting
Browse files Browse the repository at this point in the history
Temporary override of the belongs_to_required_by_default settomgs until
we can change the migrations specs to honor it
  • Loading branch information
Fryguy committed Nov 4, 2021
1 parent 2a6675d commit c716815
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/automated_review/belongs_to_required_by_default_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe "belongs_to_required_by_default" do
it "should be the default value of true", :skip => "Skipped until all migrations specs are changed to work with the default value" do
# NOTE: Once all migrations are changed, we can remove this test. It is here to act as a reminder.
expect(Rails.application.config.active_record.belongs_to_required_by_default).to be true
end
end
4 changes: 4 additions & 0 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ class Application < Rails::Application
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.

# HACK: Temporary override of the default setting until we can update the
# migration specs to honor it.
config.active_record.belongs_to_required_by_default = false
end
end

0 comments on commit c716815

Please sign in to comment.