ref: master
config/initializers/active_record_extensions.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
require 'upload_sanitizer' module ActiveRecordExtension module ClassMethods def reflect_on_association(name) reflection = super if reflection.nil? && self.superclass.respond_to?(:reflect_on_association) reflection = self.superclass.reflect_on_association(name) end reflection end end end ApplicationRecord.send :include, ActiveRecordExtension |