Since active_record_40? method for this plugin internal use is defined on toplevel, this method can actually be called from anywhere in our apps.
e.g.
% rails r "p active_record_40?"
false
This situation can be improved by moving the method under ActiveRecord module, or maybe elegantly by using refinements, but I just copied the whole logic 5 times here and there in the gem, because it's just a single line of straight forward Ruby code.
Since
active_record_40?
method for this plugin internal use is defined on toplevel, this method can actually be called from anywhere in our apps.e.g.
This situation can be improved by moving the method under ActiveRecord module, or maybe elegantly by using refinements, but I just copied the whole logic 5 times here and there in the gem, because it's just a single line of straight forward Ruby code.