You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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?
The text was updated successfully, but these errors were encountered:
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.
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:This approach, however, doesn't work because
stream-rails
overwrites methods such asactivity_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?
The text was updated successfully, but these errors were encountered: