Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to return activity text such as "updated ..." in API #361

Open
as-rikoouu opened this issue Mar 7, 2022 · 1 comment
Open

Trying to return activity text such as "updated ..." in API #361

as-rikoouu opened this issue Mar 7, 2022 · 1 comment

Comments

@as-rikoouu
Copy link

I've a requirement where I need to return the activities as a part of my rails API. I looked around at the implementation and looks like the gem relies on the the I18n and renders the actual text like "Updated the OBJECT" from the helper method text here - https://github.com/public-activity/public_activity/blob/1-6-stable/lib/public_activity/renderable.rb#L9. I tried accessing this in the API controller and it didn't work as expected.

Can someone please guide me as to how else I can grab the text the render_activity method renders?

@pokonski
Copy link
Member

pokonski commented Mar 8, 2022

Please show the code you tried that didn't work. "text" is a method on the instance of activity so you should be able to access it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants