public_activity
public_activity copied to clipboard
Trying to return activity text such as "updated ..." in API
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?
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