Questions tagged [public-activity]

Easy activity tracking for models - similar to Github's Public Activity

public_activity provides easy activity tracking for your ActiveRecord, Mongoid 3 and MongoMapper models in Rails 3 and 4.

Simply put: it can record what happens in your application and gives you the ability to present those recorded activities to users - in a similar way to how GitHub does it.

Github Repo

84 questions
0
votes
2 answers

Rails public_activity gem rspec setting error

I am integrating public_activity (version 1.5) gem to my Rails 4 app. Trying to set up tests as specified in their wiki, I write the following: #spec_helper.rb require 'public_activity/testing' PublicActivity.enabled = false However, trying to run…
borisano
  • 1,270
  • 1
  • 16
  • 28
0
votes
1 answer

Unable to set owner in Public Activity Gem

I have a social media app, having users along with question/response model in my rails app. I am using pubic activity gem in this application. I have followed the steps as per the railscast. I have also followed this documentation…
Dharmil
  • 63
  • 8
0
votes
1 answer

Temporary store an active record instance for notification view

I have a list of records on a notification panel, i've used the gem public activity to populate the panel with these notifications, when a user clicks on one instance i redirect the user to a custom URL that will give details on that notification,on…
Thabo
  • 1,303
  • 2
  • 19
  • 40
0
votes
0 answers

How can I hide activities with no user?

I'm trying to hide activities where their owners have deleted their accounts. So I added this PublicActivity::Activity.order("created_at DESC").where( recipient: current_user).where.not(owner: nil) but it returns undefined method `image' for…
0
votes
1 answer

Scoping/Combining collections and ordering them ( Public Activity Gem on rails 4)

I am using the Public Activity Gem to create a notification system of sorts.Before I state my problem, I will provide the relevant code: The controller action for Activities: def index @activities1 = PublicActivity::Activity.where(owner_id:…
kpaul
  • 379
  • 6
  • 25
0
votes
2 answers

disable public_activity tracking for sidekiq jobs that require current_user

In short I get an error that public_activity is looking for the current_user while updating a model during a sidekiq job. That is expected since there is no current_user.... how do I disable public_activity tracking while the job is running? I've…
DogEatDog
  • 2,899
  • 2
  • 36
  • 65
0
votes
1 answer

Receiving unknown attribute error Public Activity Rails 4

I'm currently using Public_Activity for user notifications. The problem is that I cannot create a new post without Public::Activity causing a 500 internal Server error. The error is occurring in my create method for the…
Daniel W
  • 73
  • 9
0
votes
1 answer

How do display activity owner name in Angular?

I'm trying to build a activity stream in my rails/angular application using the Public Activity gem and the Railscast. It's a pretty easy set up on the rails side, but I'm having some trouble with the angular side of things. I've tracked my movie…
Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185
0
votes
1 answer

Combine two where queries

How do I merge these two ActiveRecord Relations? activity1 = PublicActivity::Activity.where("user_recipients LIKE ':id,%' or user_recipients LIKE '%, :id' or user_recipients LIKE '%, :id,%' or user_recipients = ':id'", id:…
0
votes
1 answer

How to show activity only to the user whom the post belongs to in Public activity gem

what am trying to do is to use public activity gem to build a notification system i followed this railscast and everything worked just fine. I have a article and a comment model where users can comment on each others article and the user whom the…
0
votes
1 answer

Rails Public Activity Gem - after create action controller

I am trying to make an app with Rails 4. I have installed the public_activity gem. I followed the Ryan Bates Railscast and took the controller based approach, and also the lighter Common option (as opposed to tracking the Model). In my…
Mel
  • 2,481
  • 26
  • 113
  • 273
0
votes
2 answers

Rails: Public_Activity Gem - uninitialised constant

I am trying to make an app with Rails 4. I have installed the public_activity gem. I followed the Ryan Bates Railscast and took the controller based approach, and also the lighter Common option (as opposed to tracking the Model). In my…
Mel
  • 2,481
  • 26
  • 113
  • 273
0
votes
1 answer

undefined method error 'Public Activity Gem'

I have a simple rails app and i am trying to add an activity feed on it. For that i am using the Public Activity Gem and was following the this Railscast but now it's giving me an error: undefined method `shipment' for # My…
Ahmed Reza
  • 293
  • 1
  • 3
  • 19
0
votes
1 answer

undefined method `user_path' error while adding Public Activity Gem

I have a simple rails app and i am trying to add an activity feed on it. For that i am using the Public Activity Gem and was following the this Railscast but now it's giving me an error: undefined method `user_path' for…
Ahmed Reza
  • 293
  • 1
  • 3
  • 19
0
votes
1 answer

ruby on rails public_activity gem fetch followed activity

i have used public_activity gem in my app and also the act_as_follower gem where a user can follow other user the logic i am using to fetch all the following activities is @follow_activities = PublicActivity::Activity.where(trackable_type:…
user4965201
  • 973
  • 1
  • 11
  • 25