views:

14

answers:

0

I'm trying to implement a PuSH Publisher on rails. To do that I need to send an HTTP POST request to another server (a PuSH Hub) when my model updates and one of the parameters is a url to my feed (the model that changed).

Where in rails (in the MVC) am I able to do this request when my model changes and can build the url to the changed resource?

If I put it in the model, in an observer, I can't generate the url. If I put in the controller, I can't observe the model for changes, instead of it I have to explicity check if something changes than do the request.