You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't entirely correct, before and after hooks do work on the instance/class, but you have to specify the exact method, I was mistaken in believing before(save) would trigger on update. There's still an issue where instance functions aren't working though, I'll look into that.
Edit: instance functions for update won't work in a before/after hook because update simply pushes the properties and not the object itself. A failing test: https://gist.github.com/3438974.
Has anyone found a work-around for this 9 month old issue? It's biting me right now, as flatiron/restful uses Resource.update for PUT requests, and I've got a number of before/after hooks which expect a fully hydrated resource, not just the update properties.
Not sure if this is intended or not
The text was updated successfully, but these errors were encountered: