Hi!,
Is there any way we can retrieve Topics/Topics List ,Replies From Activity Tab using Ruby?
Any help would be appreciated.
Image 1 : (Non admin User)
Image 2 : (Admin User)
The discussion revolves around retrieving topics and replies from the Activity Tab using Ruby. omppatil wants to access the topics and posts a user has participated in, which are displayed when clicking on a user’s avatar.
omppatil clarifies that they want to achieve this using Ruby, believing it allows for quicker data modification compared to JavaScript. pfaffman provided a code snippet to retrieve a user’s posts, but omppatil thinks using the post_query function in the UserSummary class might be more suitable for their needs.
What problem are you trying to solve?
You want to get the posts from a particular user?
./launcher enter app
rails c
u = User.find_by_username("pat")
posts=Post.where(user_id: u.id)
You can get them with the data explorer plugin.
Did you try the code that I supplied?
Why do you want to retrieve the information with ruby?
Yes, I tried the code, and it works. I’m attempting to retrieve the posts under an event that accesses the Activity tab
I think using the function post_query in the UserSummary class can help me achieve this. Please correct me if I’m wrong.
I want to use Ruby because I think it allows me to modify my data quickly, unlike JavaScript, which lags and takes time to load pages,Please correct me if I’m wrong.