1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/models/application_record.rb

17 lines
484 B
Ruby

# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
def self.has_many(*args) # rubocop:disable Naming/PredicateName
options = args.extract_options!
options[:dependent] ||= :restrict_with_exception
super(*args, options)
end
def self.has_one(*args) # rubocop:disable Naming/PredicateName
options = args.extract_options!
options[:dependent] ||= :restrict_with_exception
super(*args, options)
end
end