Open lifeinafolder opened 10 years ago
Yes, perhaps each controller needs to init validationFields as a new Ember.A()?
I think so but once you move that property out of the mixin, the mixin needs to explicitly declare that the class using it should have it. Besides documentation, there is no easy way to have it.
I think it might be better to convert that mixin to a class. Each controller should extend from it.
Lets say two controllers A & B mix the above Mixin. These controllers are for routes A & B.
If route B is visited after route A, its "validationFields" will already be populated with fields present in route A.
This is bad as now route B is sort of impacted by behavior of validations fields on route A.
Each controller should have its own copy of validationFields for just its own view, no ?