(another Tony jumping into the discussion here)

I guess it depends on your definition of "missing" -- I believe most
browsers will generally submit all non-disabled fields.  And being able to
accept a blank input field is very useful... often times you will just pass
params[:whatever] directly down to the ORM level with minimal, if any web
framework intervention.

Say you have a form with a hidden field named "foo", and it's blank, e.g.
<input type="hidden" name="foo" value="" />.

You should get the string "" submitted to the framework.

This is different from NOT having a that field in the form, because in the
framework params[:foo] will generally be nil, indicating the value was not
submitted.

At one level, I could see the argument for it being the responsibility of
the web framework, but this seems like expected behavior that was lost.

Out of curiosity, what would AR do in this case?

 - Tony

On Mon, Oct 12, 2009 at 3:59 PM, Ashley Moran <[email protected]
> wrote:

>
> This is a recurrent problem in webapps.  Browsers don't (and can't)
> distinguish between a missing field and a blank string field.  I have
> a gut feeling the data should be cleansed at the controller level.
> But wherever, this is, IMHO, not an ORM problem, but a web framework
> one.
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to