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
2
votes
1 answer

In Rails when using the Devise gem, how to log failed logins and lockups?

I use the Devise to handle the authentications in my app and have public_activity to record things and have a log. Now I need to add a record to the log when a failed login occurs and when a account gets locked. How can I do this?
THpubs
  • 7,804
  • 16
  • 68
  • 143
2
votes
2 answers

How do I throttle messages from PublicActivity?

class Post < ActiveRecord::Base include PublicActivity::Model tracked owner: :user I'm using the PublicActivity gem to track the "update" action on the Post model. The problem is that if a user clicks on "Update post" 3 times in a minute…
sparkle
  • 7,530
  • 22
  • 69
  • 131
2
votes
1 answer

Public_activity gem parameters Rails 3

I'm trying to use Public_activity gem with parameters. on my console: c = PublicActivity::Activity.find(34) PublicActivity::Activity Load (0.2ms) SELECT "events".* FROM "events" WHERE "events"."id" = ? LIMIT 1 [["id", 34]] =>…
Henri
  • 983
  • 3
  • 11
  • 29
2
votes
1 answer

How to join with a polymorphic model using the PublicActivity gem

I'm using the PublicActivity gem: https://github.com/pokonski/public_activity All of the models I use PublicActivity to track use the column edition_id. And I'm wondering how I can scope by that column since it's polymorphic relation. Eg…
2
votes
0 answers

When POST CREATE action triggered, expect relevant activity to contain appropriate attribute

Problem I am not sure how to test this general pattern in rspec: When X controller action is triggered, check that the Y attribute is a specific value on object Z Context Using public_activity to keep track of when users vote, change vote, write new…
2
votes
2 answers

Rspec model testing - current_user in model

I am using the public_activity gem to generate activity feeds in my app, and in my model, I am using devise's current_user to identify the owner of the activity. class Question < ActiveRecord::Base ... include PublicActivity::Model tracked…
dmanaster
  • 579
  • 1
  • 6
  • 16
1
vote
1 answer

Rails ActiveAdmin create resource for PublicActitivity gem

I am a Fan of Rails Active Admin plugin, it is quite Easy and good administration tasks. gem 'activeadmin' gem 'public_activity' For news feed, I am using another gem public activity gem. I trying to create an active admin page for Activity…
Asif Meer
  • 71
  • 5
1
vote
1 answer

Remove Default column from public_activity rails gem

I am using public_activity gem to track some changes in a model. I have no need for default receipt_id and receipent_type columns. SO i just remove them from migration. But i am getting error while creating public_activity like this in…
Zia Qamar
  • 1,694
  • 1
  • 15
  • 35
1
vote
0 answers

Method for destroying activity

I am using the acts_as_votable and public_activity gems, and want to remove activities when posts are 'unliked'. The public_activity docs specify using dependent: :destroy... however, there is no model for 'likes', and so there is nothing to…
1
vote
0 answers

Public_activity gem with a profile model

Im using the public_activity gem. I have a post model, user model (generated with devise) and a profile model. Using the public_activity gem I can get the news feed to show when a Post is created, edited or deleted, but i need a way to show the…
Gurmukh Singh
  • 1,875
  • 3
  • 24
  • 62
1
vote
0 answers

Best way to build a feed notification system like Facebook in Rails?

I'm a new junior developer joining to this awesome community. I'm developing my first big personal project, and I'm stuck with this specific part. I would like to build a feed notification system like Facebook with the following features: Track…
1
vote
1 answer

How to show activity only to a specific user 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…
Ahmed Reza
  • 293
  • 1
  • 3
  • 19
1
vote
1 answer

Using a before_action in the index and extracting data from each

I think I might be missing something really obvious with this one but I just can't figure it out. I'm trying to extract the id and provider params from the parameters saved from a custom_activity event on PublicActivity and pass them to my…
teddybear
  • 546
  • 2
  • 6
  • 14
1
vote
1 answer

Rails gem - Public Activity for earlier posts

The gem does not recognize earlier post which were created before the gem was added. It only started working, when fresh posts were created. Why was that? And, how to have those earlier posts get covered by public_activity Thanks. Gem setup…
1
vote
2 answers

Rails 4 public_activity with two types of owner

I am using public_activity gem in my app and to track the owner who created the record to track the event model, I am using devise and I have two types of users, individual and company , my code is this to track the owner class Event <…
user4965201
  • 973
  • 1
  • 11
  • 25