Virtuatable / virtuatable-core

The model layer gem for the jdr tools suite
0 stars 0 forks source link

Add a decorators system #43

Closed vincentcourtois closed 4 years ago

vincentcourtois commented 4 years ago

The decorators system should allow us to make checks before a routewith a nice syntax. The goal is to make the controllers more readable, and code more re-usable. Some helpers could be embedded into the decorators system to get sessions, campaigns, and other elements more easily from the parameters, and to raise errors if they are not found.

Sources of the annotations/decorators patterns :

This issue is supposed to be split into several smaller one, with the core system of decorators, and several smaller decorators and helpers.

vincentcourtois commented 4 years ago

Has been implemented in the virtuatable gem : https://github.com/virtuatable/virtuatable/blob/master/lib/virtuatable/enhancers/base.rb