How to access text helper and url helper methods in model


I want to access TextHelper and UrlHelper methods in my model so how i am able to access it ?

I was included following helper in my model but still it is not working? also for accessing these helper method w need to give external reference?

E.g.              class Xyz                 include ActionView::Helpers::TextHelper                 include ActionView::Helpers::UrlHelper

Also suggest any other better way of doing it.

Actually, the class has moved:

class Posts < ActiveRecord::Base   include ActionController::UrlWriter


Sunny Bogawat wrote: