Url_for not working in model

Hi,
I am using ‘url_for’ for constructing url in my model but it gives me
error
<NoMethodError: undefined method `url_for’ for Xyz:Class>
how to access url_for in model and it possible to call controller
method in
model and how to call it?

Please urgently give reply?

On Sep 17, 4:07 pm, Sunny B. [email protected]
wrote:

Posted viahttp://www.ruby-forum.com/.
I don’t think you can access url_for inside a model. Why would you
need to call it there anyway?