I would like to use the truncate method in a controller. The truncate method is part of an Actionview Texthelper. Does anyone know how to access these actionview texthelpers from a controller? Thanks, Steve
I, too, would like to use something in the ActionView::Helpers - specifically I would like to have access to image_path. Anyone have a quick tip how to do so? Thanks! -- Kimball On Sep 5, 2005, at 1:14 PM, Steve Odom wrote:> I would like to use the truncate method in a controller. The truncate > method is part of an Actionview Texthelper. Does anyone know how to > access these actionview texthelpers from a controller? > > Thanks, > > Steve > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 9/26/05, Kimball Larsen <kimball-MceZc52A0j6Pgb8tOZhbtAC/G2K4zDHf@public.gmane.org> wrote:> I, too, would like to use something in the ActionView::Helpers - > specifically I would like to have access to image_path. > > Anyone have a quick tip how to do so?Have you tried including the helper in your controller, for example: class FooController < ApplicationController include ActionView::Helpers::TextHelper end You should be able to call the methods from there. Not sure of the reprocussions of this though, if any. Matt