method

strict_loading_violation!

strict_loading_violation!(owner:, reflection:)
public

No documentation available.

# File activerecord/lib/active_record/core.rb, line 226
      def self.strict_loading_violation!(owner,, reflection)) # :nodoc:
        case ActiveRecord.action_on_strict_loading_violation
        when :raise
          message = reflection.strict_loading_violation_message(owner)
          raise ActiveRecord::StrictLoadingViolationError.new(message)
        when :log
          name = "strict_loading_violation.active_record"
          ActiveSupport::Notifications.instrument(name, owner: owner, reflection: reflection)
        end
      end