Donut Donut wrote:
> I''ve written a class sitting in a file in the Lib directory and
this
> class needs to use strip_tags from TextHelper. I''ve added
>
> include ActionView::Helpers::TextHelper
>
> to the class but Ruby complains that the method strip_tags doesn''t
> exist. How can I access ActionView methods from a a class in Lib?
Are you trying to call strip_tags from a class or instance context?
If you want to add the helpers as class methods, instead use
extend ActionView::Helpers::TextHelper
--
We develop, watch us RoR, in numbers too big to ignore.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---