Skip to content

Commit

Permalink
fix strict_loading_by_default in BaseRecord (#1475)
Browse files Browse the repository at this point in the history
* Including executions in show controller

* Disabling strich_loading_by_default for all GoodJob models

* Including executions association in jobs_controller#show
  • Loading branch information
emilsosa authored Aug 29, 2024
1 parent 43ec2ad commit 0e3d094
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/good_job/jobs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def mass_update
end

def show
@job = Job.includes_advisory_locks.find(params[:id])
@job = Job.includes(:executions).includes_advisory_locks.find(params[:id])
end

def discard
Expand Down
1 change: 1 addition & 0 deletions app/models/good_job/base_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module GoodJob
# class BaseRecord < ActiveRecord::Base; end
class BaseRecord < ActiveRecordParentClass
self.abstract_class = true
self.strict_loading_by_default = false

def self.migration_pending_warning!
GoodJob.deprecator.warn(<<~DEPRECATION)
Expand Down

0 comments on commit 0e3d094

Please sign in to comment.