Hey Matt. Thanks for replying. I deleted that gist by accident earlier
today. Despite that, the problem's solved by
including Rails.application.routes.url_helpers in my model.
My Rails console sessions include Rails.application.routes.url_helpers
automatically, which is why it worked in IRB but
On 10 Oct 2011, at 18:02, Nick wrote:
> Hey guys. One of my models uses a Rails URL helper. In IRB, the method works.
> However, when I run the specs for the method, the URL helper doesn't exist.
>
> The only solution I've found is to include
> Rails.application.routes.url_helpers in both the
Hey guys. One of my models uses a Rails URL helper. In IRB, the method
works. However, when I run the specs for the method, the URL helper doesn't
exist.
The only solution I've found is to include
Rails.application.routes.url_helpers in both the model and the example
group. Obviously, that's n