views:

26

answers:

1

Hello,

In a model callback I make an API call and need to give the API some URLs. Those URLs would be easily generated by a routing helper.

The solution given in this answer does not work anymore in Rails 3.

Any solution? Thanks :)

+1  A: 

Got an answer from the rails IRC: just add

  include Rails.application.routes.url_helpers

to your model

Florent2