Skip to content

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

Open
@prioux

Description

@prioux

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions