↧
Answer by Loren for Rails public_activity feed with polymorphic following
For users: @activities = PublicActivity::Activity.where(owner_id: current_user.follows_by_type('User'), owner_type: 'User').order("created_at desc")For bands: @activities =...
View ArticleAnswer by Nikita Hismatov for Rails public_activity feed with polymorphic...
Owen, here you use so called polymorphic associations try to figure out how they work. It is about just putting into the database not only ids, but the types of objects.
View ArticleRails public_activity feed with polymorphic following
I am using two gems in my app, public_activity and acts_as_follower. I've got acts_as_follower set up fine where a user can follow another user as well as bands. The problem is making a feed out of the...
View Article