Topic: saving, polymorphism, and repetition
I've been experimenting with polymorphic relations a little, and so far have got a working voting system for multiple models. The thing that gets me itchy, and that I dont seem to find examples about, is what the best practice would be for storing results into the table.
so, as I have votes from multiple models, that all contain the same reocurring values, the save action looks pretty much the same for each controller. So far I've been driven to write a vote action in each controller I wanted the function in, because it needs to know the model associated before saving, but this is terribly repetitive, and I'd really like to end up with a votes controller with only one save action, maybe by submitting the model name from the vote form to the action along the vote itself? Is this even in good practice or is there a better way that I'm not aware of?