My question has to do with data modeling.
We have a Score-model which links to both a Division model and a Element model. Between the Division and the Element model a habtm-relation exists. The score has to be evaluated against an attribute of the Element model (criterium attribute).
Now we want to introduce the concept of "Problems". A problem is each score which does not pass the criterium. (additional info: Multiple scores will be recorded over time, different types of scores exist. Filters on score_types and date ranges are desired)
What is the best way to model the Problem concept?
- Just calculate the problems in the controller each time the view of the problems is requested
- Introduce a Problems-model (which does not really contain any new information from the Score and Element info
- Create a tableless Model like ActiveModel.
- None of the above, as it is a newbie question and you should do it like so and so ... (fill in the blanks)
Any help would be much appreciated.