Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Move render_activity_sentence into Activity model #1287
I was trying to create a status page for my sites and wanted to display some activity similar to the dashboard site activity log.
The current Activity model is rather sparse in terms of available methods making it difficult to extract usable info from. I dug into it and found out that most of the logic for extracting activity info is within the DashboardHelper#render_activity_sentence making it difficult for me to integrate with my solution.
Could we not move the
What kind of extra events are you going to track? Or do you just want a page in the CMS to display all the activities for your sites? Do you have a mockup?
Now, speaking of the implementation. I'd rather keep the model super light.
Now, if you tell me that we need those methods for another view (within a different controller), I guess we've to move the code related to the display of the activities into its own helper, like Locomotive::ActivityHelper.
How does it sound to you?