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

Add a 'show' page for the BackgroundActivity model #1448

Open
prioux opened this issue Nov 22, 2024 · 0 comments
Open

Add a 'show' page for the BackgroundActivity model #1448

prioux opened this issue Nov 22, 2024 · 0 comments

Comments

@prioux
Copy link
Member

prioux commented Nov 22, 2024

In my original design of the BackgroundActivity framework, I never intended for there to be a 'show' page for the models, given each objects basically only has a few scalar pieces of information and two parallel arrays for the items and messages.

Now that I think about it, maybe a show page would still be useful. In particular, I added methods to extract from the list of items the ones that are successful or failed, based on utility detectors (like, nil vs non-nil etc) that each model can invoke. We could extend this to a true general API for accessing these sublists, and each BackgroundActivity model could just override the methods depending on circumstances (the point is, not all BACs record successes and failures the same way).

The 'show' page would also know, for each model, the special options it supports, and a summary of the items list if an appropriate partial view is provided. Filenames for the partials would be like:

  1. For the options section: _options_{background_activity_base_class}.html.erb
  2. For the items section: _items_{background_activity_base_class}.html.erb

The end result could be a useful resource for users and admins to view why a BAC failed or succeed, and what items failed (with nice links if possible).

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

No branches or pull requests

1 participant