Sanitizing Input in Camping

Posted by hardwarehank, Tue Jul 11 12:39:37 UTC 2006

So, I fixed up my RubySig Camping app today, and decided I should sanitize the input. Here’s how:

  require 'action_view'

    class Sig < R '/sig'
      include ActionView::Helpers::TextHelper
      def post
        ...
        ...

So, it was as simple as including the TextHelper in the Sig class. Including it inside post didnt work since that would be ludicrous. I thought about it a bit more, and figured it out. I love Ruby.

Tags:

Comments

Have your say

A name is required. You may use Markdown in your comments.