stream-rails
                                
                                 stream-rails copied to clipboard
                                
                                    stream-rails copied to clipboard
                            
                            
                            
                        StreamRails::Activity overwrites activity_object method, breaks generic approach to Activity Objects
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?
Hi @thisismydesign ! I think that this approach could be supported and we would welcome a PR. If you'd like to provide a more detailed draft of what you're trying to accomplish, we could consider it while updating the rails SDK, there's a couple of features in https://github.com/GetStream/stream-ruby we want to bring in.