Our current approach to handle a generic activity type is to use STI with the base model ActivityObject and specific child models. It would be used as:
class Activity < ApplicationRecord
include StreamRails::Activity
as_activity
belongs_to :user
has_one :activity_object
# ...
end
This approach, however, doesn't work because stream-rails overwrites methods such as activity_object.
I understand the recommended approach is to create specific Activity models and reference specific Activity Objects, however, it seems to us that the generic method would work just fine as well.
Is there a specific reason why stream-rails doesn't support this approach? Are there any possible issues we're missing with this approach?
Would you consider changing this behavior or accepting a PR?