You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
For the options section: _options_{background_activity_base_class}.html.erb
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).
The text was updated successfully, but these errors were encountered:
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:
_options_{background_activity_base_class}.html.erb
_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).
The text was updated successfully, but these errors were encountered: