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

Rails uniq Public Activity

t = PublicActivity::Activity.arel_table @activities = PublicActivity::Activity.where( (t[:trackable_type].eq("Lesson").and(t[:trackable_id].in(@my_lessons_ids))) .or(t[:trackable_type].eq("Post").and(t[:trackable_id].in(@my_posts_ids))) …
7
votes
1 answer

How to use private submit to hide from feed?

In the valuations form there is a submit button and a <%= f.submit :private %> button. If private submit is clicked the submitted info will be hidden to other user's who view the profile. How can we also use <%= f.submit :private %> to hide…
user4709022
5
votes
1 answer

Is it possible to show an email on GitHub profile while keeping other emails private?

Let's say you have two emails A, and B. Your primary email is A, and you have kept your emails private. So you use the noreply GitHub email for commits in git and online, and it blocks command line pushes which expose my email. I would like to…
Anonymous Guy
  • 119
  • 2
  • 11
5
votes
2 answers

How do I do eager loading for multiple associations?

I am using public_activity and one of my partials I have this call: <%= link_to "#{activity.trackable.user.name} " + "commented on " + "#{activity.trackable.node.name}", node_path(activity.trackable.node.family_tree_id,activity.trackable.node)…
4
votes
3 answers

Destroying UpVotes on acts_as_votable

I have a rails app that is working fine using acts_as_votable. The like button upvotes the post count, and then switches to an un-like button and this down votes the post count. My issue is, that since I started using the Public Activity gem, I…
abbott567
  • 862
  • 6
  • 18
3
votes
1 answer

How do I implement bubble notifications in rails?

I already have a feed with the public_activity gem . However, I want to have a facebook-like on-site notification system where the user can see a number in red background, representing the new notifications concerning him. I have never implemented…
codigomonstruo
  • 1,081
  • 1
  • 11
  • 45
3
votes
2 answers

How to use parameters value from public_activity gem (Rails)?

I am building a Rails app. And in my app, there are Projects where users can "Follow". When a user follows one of the pages, he/she will get updates if somebody uploads/creates a folder/file. Below is the screenshot when somebody just created a new…
Ryzal Yusoff
  • 957
  • 2
  • 22
  • 49
3
votes
1 answer

Acts As Votable With Public Activity

I'm working on an app where people can like posts. I'm using the Public Activity gem and Acts As Votable. I'm getting this error when I try to view the page: undefined method 'get_upvotes' for PublicActivity::Activity:0x00000101453ad8 get_upvotes…
Rich Coy
  • 545
  • 1
  • 8
  • 24
3
votes
1 answer

How to show profile pics with activities feed?

How can we include Facebook profile pics in the activities_controller (aka the newsfeed)? class ActivitiesController < ApplicationController def index @activities = PublicActivity::Activity.order("created_at desc").where(owner_id:…
2
votes
1 answer

Views For Unread Gem For Public activity

I'm trying to implement a facebook like notification system in Rails using public activity and gem unread. I have installed the gem and created a public_activity.rb file in config/initializers. Code PublicActivity::Activity.class_eval do …
Sawo Cliff
  • 2,888
  • 1
  • 17
  • 21
2
votes
1 answer

Rails - Current_user is nil when delete a Pain

I'm using Public Activity to get notifications. I'm tracking the new prayers in my Prayer model. For some reason current_user is nil when i deleted a Pain and i don't understand why. class Prayer < ApplicationRecord include PublicActivity::Model …
Ayter
  • 21
  • 4
2
votes
0 answers

Rails left outer join on polymorphic association

I'm using the PublicActivity gem. I'm trying to eager load the associated activities for a group of users. I've set up the 'activist' association per their documentation in my user class, which defines this: def activist has_many…
swraife
  • 93
  • 2
  • 5
2
votes
1 answer

Public Activity - Creating activities based on certain attribute changes

I'm using the Rails gem, Public Activity and wanted to create an activity instance for every update action but with a catch. I only want the event created if a certain attribute is changed. In my case it would be a post's time_zone. Here is how…
Carl Edwards
  • 13,826
  • 11
  • 57
  • 119
2
votes
1 answer

Tracking and displaying likes using public activity

I have been trying to figure out how to make it so that I can create an activity page that lists out likes by other users on your OWN individual posts. In my case, I have no friend or following system so literally anyone who signs up can like a…
2
votes
1 answer

How to use public activity gem as notification system?

although i had asked this question before but didn't get any useful answer 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…
1
2 3 4 5 6