Loving ActiveRecord so far! It's usually my defacto solution for modelling with REST api's.
The reason for this pull request is, I ran into a lot of code duplication of behaviour in controllers while working on a very large app. Which could easily be in one place: the model.
Let's say you would like to show one and the same modal every time when an activerecord model fails to save. Just implement the $afterSave method and on certain error codes just call the modalService and you're good to go.
If something needs to be refactored or elaborated about please let me know.
Loving ActiveRecord so far! It's usually my defacto solution for modelling with REST api's.
The reason for this pull request is, I ran into a lot of code duplication of behaviour in controllers while working on a very large app. Which could easily be in one place: the model. Let's say you would like to show one and the same modal every time when an activerecord model fails to save. Just implement the $afterSave method and on certain error codes just call the modalService and you're good to go.
If something needs to be refactored or elaborated about please let me know.
Rene