Jian Lin
2009-May-09 13:43 UTC
want to put processing logic in Controller but no strip_tags
I want to put the processing logic in the controller... and it has a strip_tags call... and the controller portion will say the function doesn''t exist. so is there a way to call strip_tags from the controller? (instead of from view). -- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser
2009-May-09 17:44 UTC
Re: want to put processing logic in Controller but no strip_tags
Jian Lin wrote:> I want to put the processing logic in the controller...[...] No you don''t. In general, that sort of logic should probably be in a model. If you can say more about what you''re trying to accomplish, perhaps we can give more specific suggestions. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Kieran P
2009-May-09 20:21 UTC
Re: want to put processing logic in Controller but no strip_tags
See this note on getting strip_tags outside views: http://apidock.com/rails/ActionView/Helpers/SanitizeHelper/strip_tags#537-strip-tags-method-not-functioning-in-controllers-models-or-libs Regards Kieran On May 10, 1:43 am, Jian Lin <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I want to put the processing logic in the controller... and it has a > strip_tags call... and the controller portion will say the function > doesn''t exist. > > so is there a way to call strip_tags from the controller? (instead of > from view). > -- > Posted viahttp://www.ruby-forum.com/.