What was the intended way to include files that extend AR models?
For example, I have a class called
UserAction < ActiveRecord::Base
I would like to include test.rb file in environment.rb that subclasses
UserAction like so :
CommentUserAction < UserAction
However, if I do this with cache_classes = false, then things will get
screwed up because UserAction will get unloaded between requests.
I tried to use “require_dependency ‘test.rb’”, but I was running into
problems with that as well.
In the past we’d use something like “include Reloadable” but thats
Any help would be greatly appreciated.