From: Anthony Carlos <anth...@digitalphenom.com>
Date: Tue, 15 Jan 2008 00:56:06 -0500
Local: Tues, Jan 15 2008 12:56 am
Subject: Re: [CRB] Cleaning Currency Values
I would use a regex to strip out anything that is not a digit or a input.gsub(/[^0-9.]/, '').to_f I'm not sure of the "Rails Way," but it seems like a before filter -Anthony On Jan 15, 2008, at 12:18 AM, Bryce Thornton wrote: > I'm trying to figure out how to clean up some form input for a > My question: how can I sanitize this input data? > For instance, say the user enters "$115.25". Currently this is being Anthony Carlos You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||