url_for not working in model

  I am using 'url_for' for constructing url in my model but it gives me
  <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?

I don't think you can access url_for inside a model. Why would you
need to call it there anyway?